First page Back Continue Last page Overview Graphics
Predicate + Body = Rule
@security.hasPermission.when(
"perm==Staff and "
" isinstance(subject,Facility)"
)
def checkStaff(self,user,perm,subject):
return user in subject.staff or \
security.Denial(
"%s is not a member of staff"
" at %s" % (user,subject)
)
Notes: