66 """abstract base class for transitions""" |
66 """abstract base class for transitions""" |
67 permissions = META_ETYPE_PERMS |
67 permissions = META_ETYPE_PERMS |
68 |
68 |
69 name = String(required=True, indexed=True, internationalizable=True, |
69 name = String(required=True, indexed=True, internationalizable=True, |
70 maxsize=256) |
70 maxsize=256) |
|
71 type = String(vocabulary=(_('normal'), _('auto')), default='normal') |
71 description = RichString(fulltextindexed=True, |
72 description = RichString(fulltextindexed=True, |
72 description=_('semantic description of this transition')) |
73 description=_('semantic description of this transition')) |
73 condition = SubjectRelation('RQLExpression', cardinality='*?', composite='subject', |
74 condition = SubjectRelation('RQLExpression', cardinality='*?', composite='subject', |
74 description=_('a RQL expression which should return some results, ' |
75 description=_('a RQL expression which should return some results, ' |
75 'else the transition won\'t be available. ' |
76 'else the transition won\'t be available. ' |
114 destination_state = SubjectRelation('State', cardinality='1*', |
115 destination_state = SubjectRelation('State', cardinality='1*', |
115 constraints=[RQLConstraint('T subworkflow_exit S, T transition_of WF, O state_of WF')], |
116 constraints=[RQLConstraint('T subworkflow_exit S, T transition_of WF, O state_of WF')], |
116 description=_('destination state')) |
117 description=_('destination state')) |
117 |
118 |
118 |
119 |
119 # XXX should we allow managers to delete TrInfo? |
|
120 |
|
121 class TrInfo(EntityType): |
120 class TrInfo(EntityType): |
122 """workflow history item""" |
121 """workflow history item""" |
123 # 'add' security actually done by hooks |
122 # 'add' security actually done by hooks |
124 permissions = { |
123 permissions = { |
125 'read': ('managers', 'users', 'guests',), # XXX U has_read_permission O ? |
124 'read': ('managers', 'users', 'guests',), # XXX U has_read_permission O ? |
126 'add': ('managers', 'users', 'guests',), |
125 'add': ('managers', 'users', 'guests',), |
127 'delete': (), |
126 'delete': (), # XXX should we allow managers to delete TrInfo? |
128 'update': ('managers', 'owners',), |
127 'update': ('managers', 'owners',), |
129 } |
128 } |
130 |
129 |
131 from_state = SubjectRelation('State', cardinality='1*') |
130 from_state = SubjectRelation('State', cardinality='1*') |
132 to_state = SubjectRelation('State', cardinality='1*') |
131 to_state = SubjectRelation('State', cardinality='1*') |