Commit b092656b authored by iv's avatar iv

ERP5Workflow: do not create cells for state permission/role mapping

when converting workflow
parent c4ade4da
...@@ -376,15 +376,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool): ...@@ -376,15 +376,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
state.setCellRange(sorted(sdef.permission_roles.keys()), state.setCellRange(sorted(sdef.permission_roles.keys()),
sorted(workflow.getManagedRoleList()), sorted(workflow.getManagedRoleList()),
base_id='cell') base_id='cell')
i = -1
for permission in sorted(workflow.getWorkflowManagedPermissionList()):
i = i + 1
j = -1
for role in workflow.getManagedRoleList():
j = j + 1
pr_cell = state.newContent(id='cell_%s_%s'%(i,j), portal_type='PermissionRoles')
if permission in permission_roles and role in permission_roles[permission]:
pr_cell.is_selected = 1
# default state using category setter # default state using category setter
state_path = getattr(workflow, 'state_'+dc_workflow.initial_state).getPath() state_path = getattr(workflow, 'state_'+dc_workflow.initial_state).getPath()
state_path = 'source/' + '/'.join(state_path.split('/')[2:]) state_path = 'source/' + '/'.join(state_path.split('/')[2:])
......
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