/** * Can the current user manage (create, remove, edit) the workflow groups of * the collection? * * @param context the DSpace Context Object * @param collection the collection * @throws AuthorizeException if authorization error * if the current user is not allowed to manage the collection's * workflow groups * @throws SQLException if database error * if a db error occur */ public static void authorizeManageWorkflowsGroup(Context context, Collection collection) throws AuthorizeException, SQLException { if (AuthorizeConfiguration.canCollectionAdminManageWorkflows()) { authorizeService.authorizeAction(context, collection, Constants.ADMIN); } else if (AuthorizeConfiguration .canCommunityAdminManageCollectionWorkflows()) { authorizeService.authorizeAction(context, collection .getCommunities().get(0), Constants.ADMIN); } else if (!authorizeService.isAdmin(context)) { throw new AuthorizeException( "Only system admin are allowed to manage collection workflow"); } }
|| AuthorizeConfiguration.canCollectionAdminManageWorkflows() || AuthorizeConfiguration.canCommunityAdminManageAdminGroup() || AuthorizeConfiguration group.equals(collection.getWorkflowStep2()) || group.equals(collection.getWorkflowStep3()))) { if (AuthorizeConfiguration.canCollectionAdminManageWorkflows()) { return collection; } else if (AuthorizeConfiguration.canCommunityAdminManageCollectionWorkflows()) {