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.
Set up a 1x1 with an Oso Engineer
Our team is happy to help you get started with Oso. If you'd like to learn more about using Oso in your app or have any questions about this guide, schedule a 1x1 with an Oso engineer.