schemas/workflow.py
branchstable
changeset 3499 9161c215b954
parent 3444 0ad4ef5d3737
child 3503 06bced8edddf
child 3528 77a69de16709
equal deleted inserted replaced
3498:838ef1f527ab 3499:9161c215b954
    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):