[Erp5-report] r38864 fabien - /erp5/trunk/products/ERP5Type/patches/DCWorkflow.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Oct 4 14:07:24 CEST 2010
Author: fabien
Date: Mon Oct 4 14:07:18 2010
New Revision: 38864
URL: http://svn.erp5.org?rev=38864&view=rev
Log:
in case workflow is not associated with portal_types defined on the worklist,
don't display the worklist for this portal_type.
Reviewed by kazuhiko
Modified:
erp5/trunk/products/ERP5Type/patches/DCWorkflow.py
Modified: erp5/trunk/products/ERP5Type/patches/DCWorkflow.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/DCWorkflow.py?rev=38864&r1=38863&r2=38864&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/DCWorkflow.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/patches/DCWorkflow.py [utf8] Mon Oct 4 14:07:18 2010
@@ -245,10 +245,19 @@ def DCWorkflowDefinition_getWorklistVari
guard = worklist_definition.guard
if action_box_name:
variable_match = dict(((x, [y % info for y in worklist_definition.getVarMatch(x)]) for x in worklist_definition.getVarMatchKeys()))
+ if 'portal_type' in variable_match and len(variable_match['portal_type']):
+ portal_type_intersection = set(variable_match['portal_type'])\
+ .intersection(portal_type_list)
+ # in case the current workflow is not associated with portal_types
+ # defined on the worklist, don't display the worklist for this
+ # portal_type.
+ variable_match['portal_type'] = list(portal_type_intersection)
variable_match.setdefault('portal_type', portal_type_list)
is_permitted_worklist = 0
- if guard is None:
+ if len(variable_match.get('portal_type', [])):
+ pass
+ elif guard is None:
is_permitted_worklist = 1
elif (not check_guard) or \
Guard_checkWithoutRoles(guard, security_manager, self, portal):
More information about the Erp5-report
mailing list