Commit 6be6292d authored by Guillaume Michon's avatar Guillaume Michon

When doing the logical AND on all workflow defined permissions, "do not...

When doing the logical AND on all workflow defined permissions, "do not acquire" should be the default, even if the current workflow state does not define roles.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6021 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 76ea4dd9
...@@ -272,10 +272,10 @@ def updateRoleMappingsFor(self, ob): ...@@ -272,10 +272,10 @@ def updateRoleMappingsFor(self, ob):
# in each DCWorkflow # in each DCWorkflow
for other_workflow,other_sdef in other_data_list: for other_workflow,other_sdef in other_data_list:
if p in other_workflow.permissions: if p in other_workflow.permissions:
other_roles = other_sdef.permission_roles.get(p, [])
if type(other_roles) is type(()) :
role_type = 'tuple'
for role in roles: for role in roles:
other_roles = other_sdef.permission_roles.get(p, [])
if type(other_roles) is type(()) :
role_type = 'tuple'
if role not in other_roles : if role not in other_roles :
refused_roles.append(role) refused_roles.append(role)
for role in refused_roles : for role in refused_roles :
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment