From 70e9b32f41438392a61f6b36170edeabe6dce988 Mon Sep 17 00:00:00 2001
From: Fabien Morin <fabien@nexedi.com>
Date: Mon, 4 Oct 2010 12:09:16 +0000
Subject: [PATCH] this is guard independant, so need to use
 is_permitted_worklist in case there is no portal_type

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38865 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/patches/DCWorkflow.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/product/ERP5Type/patches/DCWorkflow.py b/product/ERP5Type/patches/DCWorkflow.py
index c404fd6f96..d9457a8fd5 100644
--- a/product/ERP5Type/patches/DCWorkflow.py
+++ b/product/ERP5Type/patches/DCWorkflow.py
@@ -254,10 +254,10 @@ def DCWorkflowDefinition_getWorklistVariableMatchDict(self, info,
         variable_match['portal_type'] = list(portal_type_intersection)
       variable_match.setdefault('portal_type', portal_type_list)
 
-      is_permitted_worklist = 0
       if len(variable_match.get('portal_type', [])):
-        pass
-      elif guard is None:
+        continue
+      is_permitted_worklist = 0
+      if guard is None:
         is_permitted_worklist = 1
       elif (not check_guard) or \
           Guard_checkWithoutRoles(guard, security_manager, self, portal):
-- 
2.30.9