equal
deleted
inserted
replaced
26 if attr in defaults: |
26 if attr in defaults: |
27 continue |
27 continue |
28 rdef = eschema.rdef(attr) |
28 rdef = eschema.rdef(attr) |
29 if rdef.final: # non final relation are checked by other hooks |
29 if rdef.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 rdef.check_perm(session, 'add', eid=eid) |
31 rdef.check_perm(session, 'update', eid=eid) |
32 |
32 |
33 |
33 |
34 class _CheckEntityPermissionOp(hook.LateOperation): |
34 class _CheckEntityPermissionOp(hook.LateOperation): |
35 def precommit_event(self): |
35 def precommit_event(self): |
36 #print 'CheckEntityPermissionOp', self.session.user, self.entity, self.action |
36 #print 'CheckEntityPermissionOp', self.session.user, self.entity, self.action |