From 16e7b5d0e2d591d6d7307f276c15e8c990fac642 Mon Sep 17 00:00:00 2001
From: Mame Coumba Sall <mame@nexedi.com>
Date: Thu, 22 Mar 2012 11:04:40 +0000
Subject: [PATCH] Give User Modify Portal Content and View Permission

In testTemplate, user as the author of the document tries to
modify it by giving it a title but he's not able to do so
because he does not have the ModifyPortalContent permission.
Also, give him View Permission so that objects created are indexed.
---
 .../foo_workflow/states/draft.xml             | 62 +++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/bt5/erp5_ui_test/WorkflowTemplateItem/portal_workflow/foo_workflow/states/draft.xml b/bt5/erp5_ui_test/WorkflowTemplateItem/portal_workflow/foo_workflow/states/draft.xml
index 372a7f7bb5..563ddfc3a8 100644
--- a/bt5/erp5_ui_test/WorkflowTemplateItem/portal_workflow/foo_workflow/states/draft.xml
+++ b/bt5/erp5_ui_test/WorkflowTemplateItem/portal_workflow/foo_workflow/states/draft.xml
@@ -14,6 +14,12 @@
             <key> <string>id</string> </key>
             <value> <string>draft</string> </value>
         </item>
+        <item>
+            <key> <string>permission_roles</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
         <item>
             <key> <string>title</string> </key>
             <value> <string>Draft</string> </value>
@@ -42,4 +48,60 @@
       </dictionary>
     </pickle>
   </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="PersistentMapping" module="Persistence.mapping"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>data</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>Access contents information</string> </key>
+                    <value>
+                      <tuple>
+                        <string>Author</string>
+                        <string>Manager</string>
+                        <string>Member</string>
+                      </tuple>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>Add portal content</string> </key>
+                    <value>
+                      <tuple>
+                        <string>Author</string>
+                        <string>Manager</string>
+                        <string>Member</string>
+                      </tuple>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>Modify portal content</string> </key>
+                    <value>
+                      <tuple>
+                        <string>Author</string>
+                        <string>Manager</string>
+                        <string>Member</string>
+                      </tuple>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>View</string> </key>
+                    <value>
+                      <tuple>
+                        <string>Author</string>
+                        <string>Manager</string>
+                        <string>Member</string>
+                      </tuple>
+                    </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
 </ZopeData>
-- 
2.30.9