hooks/security.py
changeset 9412 8aa6c923d6c0
parent 9395 96dba2efd16d
child 9415 0ff1de2aa55d
equal deleted inserted replaced
9411:6aec72169ee1 9412:8aa6c923d6c0
    58                 # this object as a marker saying "no specific"
    58                 # this object as a marker saying "no specific"
    59                 # permission rule for this attribute. Thus we just do
    59                 # permission rule for this attribute. Thus we just do
    60                 # nothing.
    60                 # nothing.
    61                 continue
    61                 continue
    62             if perms == ():
    62             if perms == ():
    63                 # That means an immutable attribute.
    63                 # That means an immutable attribute; as an optimization, avoid
       
    64                 # going through check_perm.
    64                 raise Unauthorized(action, str(rdef))
    65                 raise Unauthorized(action, str(rdef))
    65             rdef.check_perm(session, action, eid=eid)
    66             rdef.check_perm(session, action, eid=eid)
    66 
    67 
    67 
    68 
    68 class CheckEntityPermissionOp(hook.DataOperationMixIn, hook.LateOperation):
    69 class CheckEntityPermissionOp(hook.DataOperationMixIn, hook.LateOperation):