Release date: 2020-05-11
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 to unify
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.