-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I see in the code that the behavior when the subject is a class instance the condition always returns True
. I want a specific type of user to be able to CREATE
instances of a resource/model but others to not be able to. For example:
they.can(
READ, Model,
lambda r: is_member(r) or is_staff(r))
they.can(
EDIT, Model,
lambda r: is_member(r) or is_staff(r))
they.can(
(CREATE, DELETE), Model,
lambda r: is_staff(r))
I only want "staff" to be able to CREATE
and DELETE
instances of the Model
. However, there does not seem to be a way to do this. The last rule's condition function is never called. What am I not understanding?
Metadata
Metadata
Assignees
Labels
No labels