Édition des propriétés des membres, à partir de l'annuaire, à nouveau possible.
[Plinn.git] / profiles / default / workflows / folder_workflow / definition.xml
1 <?xml version="1.0"?>
2 <dc-workflow workflow_id="folder_workflow"
3 title="Plinn folder workflow" description=""
4 state_variable="review_state"
5 initial_state="private" manager_bypass="False">
6
7 <permission>Manage properties</permission>
8 <permission>Modify portal content</permission>
9 <permission>View</permission>
10 <state state_id="pending" title="">
11 <exit-transition transition_id="publish"/>
12 <exit-transition transition_id="reject"/>
13 <exit-transition transition_id="retract"/>
14 <exit-transition transition_id="send_email"/>
15 <permission-map name="Manage properties" acquired="False">
16 <permission-role>Manager</permission-role>
17 <permission-role>Reviewer</permission-role>
18 </permission-map>
19 <permission-map name="Modify portal content"
20 acquired="False">
21 <permission-role>Manager</permission-role>
22 <permission-role>Reviewer</permission-role>
23 </permission-map>
24 <permission-map name="View" acquired="False">
25 <permission-role>Contributor</permission-role>
26 <permission-role>Manager</permission-role>
27 <permission-role>Owner</permission-role>
28 <permission-role>Reader</permission-role>
29 <permission-role>Reviewer</permission-role>
30 </permission-map>
31 </state>
32 <state state_id="private" title="">
33 <exit-transition transition_id="direct_publish"/>
34 <exit-transition transition_id="send_email"/>
35 <exit-transition transition_id="submit"/>
36 <permission-map name="Manage properties" acquired="False">
37 <permission-role>Contributor</permission-role>
38 <permission-role>Manager</permission-role>
39 <permission-role>Owner</permission-role>
40 </permission-map>
41 <permission-map name="Modify portal content"
42 acquired="False">
43 <permission-role>Contributor</permission-role>
44 <permission-role>Manager</permission-role>
45 <permission-role>Owner</permission-role>
46 </permission-map>
47 <permission-map name="View" acquired="False">
48 <permission-role>Contributor</permission-role>
49 <permission-role>Manager</permission-role>
50 <permission-role>Owner</permission-role>
51 <permission-role>Reader</permission-role>
52 </permission-map>
53 </state>
54 <state state_id="published" title="">
55 <exit-transition transition_id="reject"/>
56 <exit-transition transition_id="retract"/>
57 <exit-transition transition_id="send_email"/>
58 <permission-map name="Manage properties" acquired="False">
59 <permission-role>Manager</permission-role>
60 </permission-map>
61 <permission-map name="Modify portal content"
62 acquired="False">
63 <permission-role>Manager</permission-role>
64 </permission-map>
65 <permission-map name="View" acquired="True">
66 <permission-role>Anonymous</permission-role>
67 </permission-map>
68 </state>
69 <transition transition_id="direct_publish"
70 title="Reviewer publishes content"
71 new_state="published" trigger="USER"
72 before_script="" after_script="">
73 <description>Reviewer can directly publish content if he have de Owner role (not necessarily ownership)</description>
74 <action url="%(content_url)s/content_publish_form?direct:boolean=True"
75 category="workflow">Publish</action>
76 <guard>
77 <guard-permission>Review portal content</guard-permission>
78 <guard-expression>python:user.allowed(here, ['Owner'])</guard-expression>
79 </guard>
80 </transition>
81 <transition transition_id="publish"
82 title="Reviewer publishes content"
83 new_state="published" trigger="USER"
84 before_script="" after_script="">
85 <action url="%(content_url)s/content_publish_form"
86 category="workflow">Publish</action>
87 <guard>
88 <guard-permission>Review portal content</guard-permission>
89 </guard>
90 </transition>
91 <transition transition_id="reject"
92 title="Reviewer rejects submission"
93 new_state="private" trigger="USER"
94 before_script="" after_script="">
95 <action url="%(content_url)s/content_reject_form"
96 category="workflow">Reject</action>
97 <guard>
98 <guard-permission>Review portal content</guard-permission>
99 </guard>
100 </transition>
101 <transition transition_id="retract"
102 title="Member retracts submission"
103 new_state="private" trigger="USER"
104 before_script="" after_script="">
105 <action url="%(content_url)s/content_retract_form"
106 category="workflow">Retract</action>
107 <guard>
108 <guard-permission>Request review</guard-permission>
109 <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))</guard-expression>
110 </guard>
111 </transition>
112 <transition transition_id="send_email" title=""
113 new_state="" trigger="USER" before_script=""
114 after_script="">
115 <action url="%(content_url)s/send_email_form?wfid=folder_workflow"
116 category="workflow">Send an email</action>
117 <guard>
118 <guard-permission>View</guard-permission>
119 <guard-role>Member</guard-role>
120 </guard>
121 </transition>
122 <transition transition_id="submit"
123 title="Member requests publishing"
124 new_state="pending" trigger="USER"
125 before_script="" after_script="">
126 <action url="%(content_url)s/content_submit_form"
127 category="workflow">Submit</action>
128 <guard>
129 <guard-permission>Request review</guard-permission>
130 </guard>
131 </transition>
132 <variable variable_id="action" for_catalog="False"
133 for_status="True" update_always="True">
134 <description>The last transition</description>
135 <default>
136
137 <expression>transition/getId|nothing</expression>
138 </default>
139 <guard>
140 </guard>
141 </variable>
142 <variable variable_id="actor" for_catalog="False"
143 for_status="True" update_always="True">
144 <description>The ID of the user who performed the last transition</description>
145 <default>
146
147 <expression>user/getId</expression>
148 </default>
149 <guard>
150 </guard>
151 </variable>
152 <variable variable_id="comments" for_catalog="False"
153 for_status="True" update_always="True">
154 <description>Comments about the last transition</description>
155 <default>
156
157 <expression>python:state_change.kwargs.get('comment', '')</expression>
158 </default>
159 <guard>
160 </guard>
161 </variable>
162 <variable variable_id="email_sent" for_catalog="False"
163 for_status="True" update_always="True">
164 <default>
165
166 <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])</expression>
167 </default>
168 <guard>
169 </guard>
170 </variable>
171 <variable variable_id="review_history" for_catalog="False"
172 for_status="False" update_always="False">
173 <description>Provides access to workflow history</description>
174 <default>
175
176 <expression>state_change/getHistory</expression>
177 </default>
178 <guard>
179 <guard-permission>Request review</guard-permission>
180 <guard-permission>Review portal content</guard-permission>
181 </guard>
182 </variable>
183 <variable variable_id="time" for_catalog="False"
184 for_status="True" update_always="True">
185 <description>Time of the last transition</description>
186 <default>
187
188 <expression>state_change/getDateTime</expression>
189 </default>
190 <guard>
191 </guard>
192 </variable>
193 <script script_id="sendNotificationEmail"
194 type="Script (Python)"
195 filename="workflows/folder_workflow/scripts/sendNotificationEmail.py"
196 module="" function=""/>
197 </dc-workflow>