equal
deleted
inserted
replaced
56 # XXX should be on BaseTransition w/ AND/OR selectors when we will |
56 # XXX should be on BaseTransition w/ AND/OR selectors when we will |
57 # implements #345274 |
57 # implements #345274 |
58 allowed_transition = SubjectRelation('BaseTransition', cardinality='**', |
58 allowed_transition = SubjectRelation('BaseTransition', cardinality='**', |
59 constraints=[RQLConstraint('S state_of WF, O transition_of WF')], |
59 constraints=[RQLConstraint('S state_of WF, O transition_of WF')], |
60 description=_('allowed transitions from this state')) |
60 description=_('allowed transitions from this state')) |
61 state_of = SubjectRelation('Workflow', cardinality='+*', |
61 state_of = SubjectRelation('Workflow', cardinality='1*', |
62 description=_('workflow to which this state belongs'), |
62 description=_('workflow to which this state belongs'), |
63 constraints=[RQLUniqueConstraint('S name N, Y state_of O, Y name N')]) |
63 constraints=[RQLUniqueConstraint('S name N, Y state_of O, Y name N')]) |
64 |
64 |
65 |
65 |
66 class BaseTransition(EntityType): |
66 class BaseTransition(EntityType): |
79 'the current entity and the current user')) |
79 'the current entity and the current user')) |
80 |
80 |
81 require_group = SubjectRelation('CWGroup', cardinality='**', |
81 require_group = SubjectRelation('CWGroup', cardinality='**', |
82 description=_('group in which a user should be to be ' |
82 description=_('group in which a user should be to be ' |
83 'allowed to pass this transition')) |
83 'allowed to pass this transition')) |
84 transition_of = SubjectRelation('Workflow', cardinality='+*', |
84 transition_of = SubjectRelation('Workflow', cardinality='1*', |
85 description=_('workflow to which this transition belongs'), |
85 description=_('workflow to which this transition belongs'), |
86 constraints=[RQLUniqueConstraint('S name N, Y transition_of O, Y name N')]) |
86 constraints=[RQLUniqueConstraint('S name N, Y transition_of O, Y name N')]) |
87 |
87 |
88 |
88 |
89 class Transition(BaseTransition): |
89 class Transition(BaseTransition): |