List<String> allowedSteps = new ArrayList<String>();
allowedSteps.add(Content.STATUS_NEW);
allowedSteps.add(Content.STATUS_DRAFT);
Iterator<Step> stepsIter = workflow.getSteps().iterator();
while (stepsIter.hasNext()) {
Step step = stepsIter.next();
String stepRole = step.getRole();
if (null == stepRole || stepRole.trim().length() == 0
|| this.getAuthorizationManager().isAuthOnRole(user, step.getRole())) {
allowedSteps.add(step.getCode());
}
}
if (isSupervisor) {
allowedSteps.add(Content.STATUS_READY);
allowedSteps.add(Content.STATUS_PUBLIC);