hooks/security.py
changeset 3720 5376aaadd16b
parent 3689 deb13e88e037
parent 3376 f5c69485381f
child 3890 d7a270f50f54
equal deleted inserted replaced
3678:29f74716fd70 3720:5376aaadd16b
    23     except AttributeError:
    23     except AttributeError:
    24         editedattrs = entity
    24         editedattrs = entity
    25     for attr in editedattrs:
    25     for attr in editedattrs:
    26         if attr in defaults:
    26         if attr in defaults:
    27             continue
    27             continue
    28         rschema = eschema.subject_relation(attr)
    28         rschema = eschema.subjrels[attr]
    29         if rschema.is_final(): # non final relation are checked by other hooks
    29         if rschema.final: # non final relation are checked by other hooks
    30             # add/delete should be equivalent (XXX: unify them into 'update' ?)
    30             # add/delete should be equivalent (XXX: unify them into 'update' ?)
    31             rschema.check_perm(session, 'add', eid)
    31             rschema.check_perm(session, 'add', eid)
    32 
    32 
    33 
    33 
    34 class _CheckEntityPermissionOp(hook.LateOperation):
    34 class _CheckEntityPermissionOp(hook.LateOperation):