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