[Erp5-report] r18134 - in /erp5/trunk/bt5/erp5_base: WorkflowTemplateItem/portal_workflow/q...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Dec 7 17:49:39 CET 2007
Author: jerome
Date: Fri Dec 7 17:49:39 2007
New Revision: 18134
URL: http://svn.erp5.org?rev=18134&view=rev
Log:
accessing context in workflow script is Unauthorized for non Manager users
Modified:
erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/query_workflow/scripts/notifyOwner.xml
erp5/trunk/bt5/erp5_base/bt/revision
Modified: erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/query_workflow/scripts/notifyOwner.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/query_workflow/scripts/notifyOwner.xml?rev=18134&r1=18133&r2=18134&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/query_workflow/scripts/notifyOwner.xml (original)
+++ erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/query_workflow/scripts/notifyOwner.xml Fri Dec 7 17:49:39 2007
@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
- <tuple>
- <string>Products.PythonScripts.PythonScript</string>
- <string>PythonScript</string>
- </tuple>
- <none/>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
</tuple>
</pickle>
<pickle>
@@ -72,19 +69,22 @@
This script tries to send a message to the appropriate recipient\n
from the appropriate sender. It uses portal_notifications\n
and the getObject API of ERP5Catalog.\n
+This script has a proxy role to make sure we can find person documents in the\n
+catalog.\n
"""\n
from Products.ERP5Type.Log import log\n
\n
object = sci[\'object\']\n
-translateString = context.Base_translateString\n
-portal_catalog = object.portal_catalog\n
+portal = sci.getPortal()\n
+translateString = portal.Base_translateString\n
+portal_catalog = portal.portal_catalog\n
\n
# Get the owner\n
owner = object.getViewPermissionOwner()\n
owner_value = portal_catalog.getResultValue(portal_type=\'Person\', reference=owner)\n
\n
# Get the authenticated user\n
-user = context.portal_membership.getAuthenticatedMember().getUserName()\n
+user = portal.portal_membership.getAuthenticatedMember().getUserName()\n
user_value = portal_catalog.getResultValue(portal_type=\'Person\', reference=user)\n
\n
# If users are not defined, we need to log and return\n
@@ -183,7 +183,7 @@
<string>_getitem_</string>
<string>object</string>
<string>_getattr_</string>
- <string>context</string>
+ <string>portal</string>
<string>translateString</string>
<string>portal_catalog</string>
<string>owner</string>
@@ -194,6 +194,7 @@
<string>subject</string>
<string>msg</string>
<string>dict</string>
+ <string>context</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_base/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/bt/revision?rev=18134&r1=18133&r2=18134&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/bt/revision (original)
+++ erp5/trunk/bt5/erp5_base/bt/revision Fri Dec 7 17:49:39 2007
@@ -1,1 +1,1 @@
-257
+258
More information about the Erp5-report
mailing list