This release contains breaking changes. Be sure to follow migration steps before upgrading.
Removed arguments to
oso.polar_class() decorator no longer accepts
methods arguments. Any field or method defined on the Application Class
will be accessible from Polar by default.
@polar_class(fields=("id", "name", "specialty"), methods=("department", "hospital")) class Doctor: ...
@polar_class class Doctor: ...
Attempt to unify Python instances in Polar results in error
Fix for undefined behavior of application instance unification. Now results in the following error message:
PolarRuntimeException: Invalid operation: cannot unify Python instance objects.
allow(actor: User, action, resource) if actor = resource.owner();
actor is an instance of the
User application class, any attempt
actor (using the
= operator) will result in a
The appropriate way to compare application instance objects is to use field-by-field comparison.
allow(actor: User, action, resource) if actor.id = resource.owner().id;
Other bugs & improvements
- Bug fix: Nested logical operators now evaluate appropriately.
Connect with us on Slack
If you have any questions, or just want to talk something through, jump into Slack. An Oso engineer or one of the thousands of developers in the growing community will be happy to help.