Bot releases are visible (Hide)
Published by github-actions[bot] about 3 years ago
flask-oso 0.22.0
Published by github-actions[bot] about 3 years ago
oso 0.22.0
Published by github-actions[bot] about 3 years ago
django-oso 0.21.0
Published by github-actions[bot] about 3 years ago
sqlalchemy-oso 0.21.0
Published by github-actions[bot] about 3 years ago
flask-oso 0.21.0
Published by github-actions[bot] about 3 years ago
oso
0.21.0POLAR_LOG=0
or POLAR_LOG=off
.@alexhafner
for thetypes
parameter to register_class()
renamed to fields
This now mirrors the parameter's name in the other language libraries.
To migrate to the new API, change:
oso.register_class(User, types=...)
to:
oso.register_class(User, fields=...)
Data filtering API types (Relation
, Filter
) are now importable from the
top level oso
module:
from oso import Oso, Relation, Filter
Fixed a bug concerning fetching errors from the core containing additional
details. [#1229]
Relation
, Filter
) are now defined on the topOso
module.require 'oso'
Relation = Oso::Relation
require
-ed as "oso"
or "oso-oso"
. Thanks to@davidpelaez
for the contribution!types
parameter to registerClass()
renamed to fields
This now mirrors the parameter's name in the other language libraries.
To migrate to the new API, change:
oso.registerClass(User, { types: { ... } });
to:
oso.registerClass(User, { fields: { ... } });
To help with catching erroneous policies, accessing a property that doesn't
exist on an object or anywhere in its prototype chain will now return an error.
Policy:
allow(user, "read", "document") if user.isAdmin;
Code:
const user = {name: "notanadmin"};
await oso.isAllowed(user, "read", "document");
Before this change, this isAllowed()
call would silently fail. Oso would look
up the nonexistent isAdmin
property on the {name: "notanadmin"}
object,
which returns undefined
. Since undefined
is not equivalent to true
, the
isAllowed()
call would fail, but the developer wouldn't have any idea that
they'd written a policy that referenced a nonexistent property.
Now, this will error since isAdmin
is not a property on the user
object.
This will still work if (1) the isAdmin
property is explicitly set to
undefined
(e.g., user = {isAdmin: undefined}
) or (2) the property check is
moved into the head of the rule:
allow(user: {isAdmin: true}, "read", "document");
since specializers will not error if a property doesn't exist (but the {name: "notanadmin"}
object will fail to match the specializer and the isAllowed()
call will still correctly return false
).
authorizedQuery
, authorizedResources
) nowGo methods that are defined on pointer receivers can now be called from Polar.
Before this change, only methods defined on value receivers could be called.
type Typ struct {
x int
}
// This could be called from Polar before
func (t Typ) Method() int {
return t.x + 1
}
// This could not be called from Polar before but can now.
func (t *Typ) PtrMethod() bool {
return t.x == 1
}
LoadFiles
API. Thissqlalchemy-oso
0.21.0Published by github-actions[bot] about 3 years ago
sqlalchemy-oso 0.20.1
Published by github-actions[bot] about 3 years ago
django-oso 0.20.1
Published by github-actions[bot] about 3 years ago
flask-oso 0.20.1
Published by github-actions[bot] about 3 years ago
oso 0.20.1
Published by github-actions[bot] about 3 years ago
sqlalchemy-oso 0.20.1-beta
Published by github-actions[bot] about 3 years ago
oso 0.20.1-beta
Published by github-actions[bot] about 3 years ago
oso 0.15.1
Published by github-actions[bot] about 3 years ago
sqlalchemy-oso 0.20.0-beta
Published by github-actions[bot] about 3 years ago
django-oso 0.20.0-beta
Published by github-actions[bot] about 3 years ago
flask-oso 0.20.0-beta
Published by github-actions[bot] about 3 years ago
oso 0.20.0-beta
Published by github-actions[bot] about 3 years ago
sqlalchemy-oso 0.11.0
Published by github-actions[bot] about 3 years ago
django-oso 0.11.0
Published by github-actions[bot] about 3 years ago
flask-oso 0.12.0