server/securityhooks.py
branchstable
changeset 3689 deb13e88e037
parent 2920 64322aa83a1d
child 3877 7ca53fc72a0a
child 4212 ab6573088b4a
equal deleted inserted replaced
3688:421fb447ecb2 3689:deb13e88e037
    23     except AttributeError:
    23     except AttributeError:
    24         editedattrs = entity.keys()
    24         editedattrs = entity.keys()
    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(LateOperation):
    34 class CheckEntityPermissionOp(LateOperation):