From 2faf90ded00d779f27b46d0e6fed3737eec1b01f Mon Sep 17 00:00:00 2001 From: Vincenzo Mecca Date: Wed, 11 Sep 2024 16:26:19 +0200 Subject: [PATCH] [DSC-1905] Removes process-cleaner for non administrators --- .../administer/ProcessCleanerConfiguration.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/dspace-api/src/main/java/org/dspace/administer/ProcessCleanerConfiguration.java b/dspace-api/src/main/java/org/dspace/administer/ProcessCleanerConfiguration.java index e765c2a4c185..91dcfb5dfec5 100644 --- a/dspace-api/src/main/java/org/dspace/administer/ProcessCleanerConfiguration.java +++ b/dspace-api/src/main/java/org/dspace/administer/ProcessCleanerConfiguration.java @@ -7,12 +7,7 @@ */ package org.dspace.administer; -import java.sql.SQLException; -import java.util.List; - import org.apache.commons.cli.Options; -import org.dspace.core.Context; -import org.dspace.scripts.DSpaceCommandLineParameter; import org.dspace.scripts.configuration.ScriptConfiguration; /** @@ -22,17 +17,6 @@ public class ProcessCleanerConfiguration extends Scrip private Class dspaceRunnableClass; - @Override - public boolean isAllowedToExecute(Context context, List commandLineParameters) { - try { - return authorizeService.isAdmin(context) || authorizeService.isComColAdmin(context) || - authorizeService.isItemAdmin(context); - } catch (SQLException e) { - throw new RuntimeException( - "SQLException occurred when checking if the current user is eligible to run the script", e); - } - } - @Override public Options getOptions() { if (options == null) {