equal
deleted
inserted
replaced
114 |
114 |
115 def __call__(self): |
115 def __call__(self): |
116 # save back editedattrs in case the entity is reedited later in the |
116 # save back editedattrs in case the entity is reedited later in the |
117 # same transaction, which will lead to cw_edited being |
117 # same transaction, which will lead to cw_edited being |
118 # overwritten |
118 # overwritten |
|
119 action = 'add' if self._cw.added_in_transaction(self.entity.eid) else 'update' |
119 CheckEntityPermissionOp.get_instance(self._cw).add_data( |
120 CheckEntityPermissionOp.get_instance(self._cw).add_data( |
120 (self.entity.eid, 'update', self.entity.cw_edited) ) |
121 (self.entity.eid, action, self.entity.cw_edited) ) |
121 |
122 |
122 |
123 |
123 class BeforeDelEntitySecurityHook(SecurityHook): |
124 class BeforeDelEntitySecurityHook(SecurityHook): |
124 __regid__ = 'securitybeforedelentity' |
125 __regid__ = 'securitybeforedelentity' |
125 events = ('before_delete_entity',) |
126 events = ('before_delete_entity',) |