oso 0.26.3


Other bugs & improvements


Other bugs & improvements

Fixed type checking of objects and custom checks

Previously, any JavaScript object would type check as a Dictionary, and it wasn’t possible to override this with a custom isa check.

In this version, only an object explicitly created with new Dict({x: 1}) will be recognized as a Polar dictionary.

This fixes the ability to use custom isa checks. For example:

p.registerClass(Object, {
  name: 'Bar',
  isaCheck: (instance) => instance instanceof Object && instance.typename && instance.typename == "Bar"

registers a class with Polar named Bar, and Polar will consider any object with a field typename set to "Bar" as an instance of the type Bar.

Fixed typeOrmAdapter bug for policies with nil

Previously, the typeOrmAdapter would generate queries with incomplete filter conditions for policies that contained nil values, e.g.:

allow("steve", "read", issue: Issue) if
    issue.title = "bug" and
    issue.subtitle = nil;

This has been fixed.

  • Thanks to @vaseala for fixing a typo in the Node.js documentation!


Other bugs & improvements

  • Fixed data filtering behavior when many-to-one relation is null. Thanks to @lp for the fix!


Other bugs & improvements

  • Thanks to @ZackPierce for making the tracing-subscriber dependency optional per best practices!

sqlalchemy-oso 0.26.3

Other bugs & improvements

  • A missing version constraint on the Flask-SQLAlchemy extra allowed Flask-SQLAlchemy versions greater than 2.x to be used with sqlalchemy-oso. The sqlalchemy-oso library requires some updates for compatibility with Flask-SQLAlchemy 3.0, and progress on those updates will be tracked in https://github.com/osohq/oso/issues/1631. Until compatibility with Flask-SQLAlchemy 3.0 is achieved, we’ve added a runtime check on the Flask-SQLAlchemy version that will raise an error if an incompatible version is found. Thanks to @snstanton for the report and PR!

Special Thanks

Special thanks to @kkirsche for landing three pull requests expanding type hints in the oso and sqlalchemy-oso libraries and implementing isort to bring import statements across all of our Python libraries in line with best practices.

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.