equal
deleted
inserted
replaced
566 |
566 |
567 |
567 |
568 def before_add_in_state(session, eidfrom, rtype, eidto): |
568 def before_add_in_state(session, eidfrom, rtype, eidto): |
569 """check state apply, in case of direct in_state change using unsafe_execute |
569 """check state apply, in case of direct in_state change using unsafe_execute |
570 """ |
570 """ |
571 nocheck = session.transaction_data.setdefault('skip-security', ()) |
571 nocheck = session.transaction_data.setdefault('skip-security', set()) |
572 if (eidfrom, 'in_state', eidto) in nocheck: |
572 if (eidfrom, 'in_state', eidto) in nocheck: |
573 # state changed through TrInfo insertion, so we already know it's ok |
573 # state changed through TrInfo insertion, so we already know it's ok |
574 return |
574 return |
575 entity = session.entity_from_eid(eidfrom) |
575 entity = session.entity_from_eid(eidfrom) |
576 mainwf = entity.main_workflow |
576 mainwf = entity.main_workflow |