[Erp5-report] r27265 - in /erp5/trunk/products/ERP5Type/patches: DCWorkflow.py WorkflowTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri May 29 17:40:01 CEST 2009
Author: romain
Date: Fri May 29 17:40:00 2009
New Revision: 27265
URL: http://svn.erp5.org?rev=27265&view=rev
Log:
Prevent to check worklist guard when filling worklist cache, as this action
required all permissions.
Modified:
erp5/trunk/products/ERP5Type/patches/DCWorkflow.py
erp5/trunk/products/ERP5Type/patches/WorkflowTool.py
Modified: erp5/trunk/products/ERP5Type/patches/DCWorkflow.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/DCWorkflow.py?rev=27265&r1=27264&r2=27265&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/DCWorkflow.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/patches/DCWorkflow.py [utf8] Fri May 29 17:40:00 2009
@@ -206,7 +206,8 @@
DCWorkflowDefinition.listGlobalActions = DCWorkflowDefinition_listGlobalActions
from Products.ERP5Type.patches.WorkflowTool import SECURITY_PARAMETER_ID, WORKLIST_METADATA_KEY
-def DCWorkflowDefinition_getWorklistVariableMatchDict(self, info):
+def DCWorkflowDefinition_getWorklistVariableMatchDict(self, info,
+ check_guard=True):
"""
Return a dict which has an entry per worklist definition
(worklist id as key) and which value is a dict composed of
@@ -247,7 +248,8 @@
is_permitted_worklist = 0
if guard is None:
is_permitted_worklist = 1
- elif Guard_checkWithoutRoles(guard, security_manager, self, portal):
+ elif (not check_guard) or \
+ Guard_checkWithoutRoles(guard, security_manager, self, portal):
is_permitted_worklist = 1
variable_match[SECURITY_PARAMETER_ID] = guard.roles
Modified: erp5/trunk/products/ERP5Type/patches/WorkflowTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/WorkflowTool.py?rev=27265&r1=27264&r2=27265&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/WorkflowTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/patches/WorkflowTool.py [utf8] Fri May 29 17:40:00 2009
@@ -585,7 +585,7 @@
for wf_id in wf_ids:
wf = self.getWorkflowById(wf_id)
if wf is not None:
- a = wf.getWorklistVariableMatchDict(info)
+ a = wf.getWorklistVariableMatchDict(info, check_guard=False)
if a is not None:
worklist_dict[wf_id] = a
# End of duplicated code
More information about the Erp5-report
mailing list