equal
deleted
inserted
replaced
274 __select__ = WorkflowHook.__select__ & hook.match_rtype('in_state') |
274 __select__ = WorkflowHook.__select__ & hook.match_rtype('in_state') |
275 events = ('before_add_relation',) |
275 events = ('before_add_relation',) |
276 |
276 |
277 def __call__(self): |
277 def __call__(self): |
278 session = self._cw |
278 session = self._cw |
279 nocheck = session.transaction_data.setdefault('skip-security', ()) |
279 nocheck = session.transaction_data.get('skip-security', ()) |
280 if (self.eidfrom, 'in_state', self.eidto) in nocheck: |
280 if (self.eidfrom, 'in_state', self.eidto) in nocheck: |
281 # state changed through TrInfo insertion, so we already know it's ok |
281 # state changed through TrInfo insertion, so we already know it's ok |
282 return |
282 return |
283 entity = session.entity_from_eid(self.eidfrom) |
283 entity = session.entity_from_eid(self.eidfrom) |
284 mainwf = entity.main_workflow |
284 mainwf = entity.main_workflow |