[web] move workflow related uicfg stuff to the workflow module stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 24 Mar 2010 15:08:24 +0100
branchstable
changeset 4995 1817b87c7f67
parent 4994 108bb7f2a171
child 4996 45ce27d538a1
[web] move workflow related uicfg stuff to the workflow module
web/views/actions.py
web/views/workflow.py
--- a/web/views/actions.py	Wed Mar 24 14:17:01 2010 +0100
+++ b/web/views/actions.py	Wed Mar 24 15:08:24 2010 +0100
@@ -290,6 +290,7 @@
                         continue
                     # check the target types can be added as well
                     if teschema.may_have_permission('add', req):
+                        print 'hop', rschema, teschema, role
                         yield rschema, teschema, role
 
     def linkto_url(self, entity, rtype, etype, target):
@@ -404,16 +405,8 @@
 
 addmenu = uicfg.actionbox_appearsin_addmenu
 addmenu.tag_subject_of(('*', 'require_permission', '*'), False)
-addmenu.tag_subject_of(('*', 'wf_info_for', '*'), False)
-addmenu.tag_object_of(('*', 'wf_info_for', '*'), False)
-addmenu.tag_object_of(('*', 'state_of', 'CWEType'), True)
-addmenu.tag_object_of(('*', 'transition_of', 'CWEType'), True)
 addmenu.tag_object_of(('*', 'relation_type', 'CWRType'), True)
 addmenu.tag_object_of(('*', 'from_entity', 'CWEType'), False)
 addmenu.tag_object_of(('*', 'to_entity', 'CWEType'), False)
 addmenu.tag_object_of(('*', 'in_group', 'CWGroup'), True)
 addmenu.tag_object_of(('*', 'bookmarked_by', 'CWUser'), True)
-addmenu.tag_subject_of(('Transition', 'destination_state', '*'), True)
-addmenu.tag_object_of(('*', 'allowed_transition', 'Transition'), True)
-addmenu.tag_object_of(('*', 'destination_state', 'State'), True)
-addmenu.tag_subject_of(('State', 'allowed_transition', '*'), True)
--- a/web/views/workflow.py	Wed Mar 24 14:17:01 2010 +0100
+++ b/web/views/workflow.py	Wed Mar 24 15:08:24 2010 +0100
@@ -35,6 +35,15 @@
 _abaa.tag_subject_of(('State', 'allowed_transition', 'BaseTransition'), False)
 _abaa.tag_object_of(('SubWorkflowExitPoint', 'destination_state', 'State'),
                     False)
+_abaa.tag_subject_of(('*', 'wf_info_for', '*'), False)
+_abaa.tag_object_of(('*', 'wf_info_for', '*'), False)
+
+_abaa.tag_object_of(('*', 'state_of', 'CWEType'), True)
+_abaa.tag_object_of(('*', 'transition_of', 'CWEType'), True)
+_abaa.tag_subject_of(('Transition', 'destination_state', '*'), True)
+_abaa.tag_object_of(('*', 'allowed_transition', 'Transition'), True)
+_abaa.tag_object_of(('*', 'destination_state', 'State'), True)
+_abaa.tag_subject_of(('State', 'allowed_transition', '*'), True)
 _abaa.tag_object_of(('State', 'state_of', 'Workflow'), True)
 _abaa.tag_object_of(('Transition', 'transition_of', 'Workflow'), True)
 _abaa.tag_object_of(('WorkflowTransition', 'transition_of', 'Workflow'), True)