First page Back Continue Last page Overview Graphics
Predicate + Body = Rule
Predicate = when does this rule apply?
- PyProtocols uses "when()" decorators
- @security.hasPermission.when(
"perm==Staff and "
" isinstance(subject,Facility)"
)
Body = what to do about it
- PyProtocols uses normal functions
- def checkStaff(self,user,perm,subject):
return user in subject.staff ...
Notes: