equal
deleted
inserted
replaced
55 # XXX should be on BaseTransition w/ AND/OR selectors when we will |
55 # XXX should be on BaseTransition w/ AND/OR selectors when we will |
56 # implements #345274 |
56 # implements #345274 |
57 allowed_transition = SubjectRelation('BaseTransition', cardinality='**', |
57 allowed_transition = SubjectRelation('BaseTransition', cardinality='**', |
58 constraints=[RQLConstraint('S state_of WF, O transition_of WF')], |
58 constraints=[RQLConstraint('S state_of WF, O transition_of WF')], |
59 description=_('allowed transitions from this state')) |
59 description=_('allowed transitions from this state')) |
60 state_of = SubjectRelation('Workflow', cardinality='1*', |
60 state_of = SubjectRelation('Workflow', cardinality='1*', composite='object', |
61 description=_('workflow to which this state belongs'), |
61 description=_('workflow to which this state belongs'), |
62 constraints=[RQLUniqueConstraint('S name N, Y state_of O, Y name N')]) |
62 constraints=[RQLUniqueConstraint('S name N, Y state_of O, Y name N')]) |
63 |
63 |
64 |
64 |
65 class BaseTransition(EntityType): |
65 class BaseTransition(EntityType): |
78 'the current entity and the current user')) |
78 'the current entity and the current user')) |
79 |
79 |
80 require_group = SubjectRelation('CWGroup', cardinality='**', |
80 require_group = SubjectRelation('CWGroup', cardinality='**', |
81 description=_('group in which a user should be to be ' |
81 description=_('group in which a user should be to be ' |
82 'allowed to pass this transition')) |
82 'allowed to pass this transition')) |
83 transition_of = SubjectRelation('Workflow', cardinality='1*', |
83 transition_of = SubjectRelation('Workflow', cardinality='1*', composite='object', |
84 description=_('workflow to which this transition belongs'), |
84 description=_('workflow to which this transition belongs'), |
85 constraints=[RQLUniqueConstraint('S name N, Y transition_of O, Y name N')]) |
85 constraints=[RQLUniqueConstraint('S name N, Y transition_of O, Y name N')]) |
86 |
86 |
87 |
87 |
88 class Transition(BaseTransition): |
88 class Transition(BaseTransition): |
221 'add': ('managers', 'users', 'guests',), |
221 'add': ('managers', 'users', 'guests',), |
222 'delete': (), |
222 'delete': (), |
223 } |
223 } |
224 inlined = True |
224 inlined = True |
225 |
225 |
226 cardinality='1*' |
226 cardinality = '1*' |
227 composite = 'object' |
227 composite = 'object' |
228 fulltext_container = composite |
228 fulltext_container = composite |
229 subject = 'TrInfo' |
229 subject = 'TrInfo' |
230 |
230 |
231 |
231 |