Merge pull request #179 from KevinVdV/DS-1416

[DS-1416] NPE when removing roles from Collection workflow steps
This commit is contained in:
helix84
2013-01-28 13:22:39 -08:00

View File

@@ -535,21 +535,24 @@ public class FlowContainerUtils
collection.removeSubmitters();
}
else{
WorkflowUtils.deleteRoleGroup(context, collection, roleName);
if(ConfigurationManager.getProperty("workflow", "workflow.framework").equals("xmlworkflow"))
{
WorkflowUtils.deleteRoleGroup(context, collection, roleName);
}else{
if (ROLE_WF_STEP1.equals(roleName))
{
collection.setWorkflowGroup(1, null);
}
else if (ROLE_WF_STEP2.equals(roleName))
{
collection.setWorkflowGroup(2, null);
}
else if (ROLE_WF_STEP3.equals(roleName))
{
collection.setWorkflowGroup(3, null);
}
}
}
// else if (ROLE_WF_STEP1.equals(roleName))
// {
// collection.setWorkflowGroup(1, null);
// }
// else if (ROLE_WF_STEP2.equals(roleName))
// {
// collection.setWorkflowGroup(2, null);
// }
// else if (ROLE_WF_STEP3.equals(roleName))
// {
// collection.setWorkflowGroup(3, null);
//
// }
// Second, remove all authorizations for this role by searching for all policies that this
// group has on the collection and remove them otherwise the delete will fail because