mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Merge pull request #9996 from DSpace/backport-9746-to-dspace-8_x
[Port dspace-8_x] Fix 9734: Check configured workflow.reviewer.file-edit to show item e…
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
package org.dspace.xmlworkflow.state.actions.processingaction;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -20,6 +21,8 @@ import org.dspace.app.util.Util;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.content.MetadataFieldName;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.services.ConfigurationService;
|
||||
import org.dspace.services.factory.DSpaceServicesFactory;
|
||||
import org.dspace.xmlworkflow.service.WorkflowRequirementsService;
|
||||
import org.dspace.xmlworkflow.state.Step;
|
||||
import org.dspace.xmlworkflow.state.actions.ActionAdvancedInfo;
|
||||
@@ -34,6 +37,9 @@ import org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItem;
|
||||
public class ScoreReviewAction extends ProcessingAction {
|
||||
private static final Logger log = LogManager.getLogger(ScoreReviewAction.class);
|
||||
|
||||
private final ConfigurationService configurationService
|
||||
= DSpaceServicesFactory.getInstance().getConfigurationService();
|
||||
|
||||
// Option(s)
|
||||
public static final String SUBMIT_SCORE = "submit_score";
|
||||
|
||||
@@ -114,7 +120,14 @@ public class ScoreReviewAction extends ProcessingAction {
|
||||
|
||||
@Override
|
||||
public List<String> getOptions() {
|
||||
return List.of(SUBMIT_SCORE, RETURN_TO_POOL);
|
||||
List<String> options = new ArrayList<>();
|
||||
options.add(SUBMIT_SCORE);
|
||||
if (configurationService.getBooleanProperty("workflow.reviewer.file-edit", false)) {
|
||||
options.add(SUBMIT_EDIT_METADATA);
|
||||
}
|
||||
options.add(RETURN_TO_POOL);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -21,6 +21,8 @@ import org.dspace.content.WorkspaceItem;
|
||||
import org.dspace.content.factory.ContentServiceFactory;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.eperson.EPerson;
|
||||
import org.dspace.services.ConfigurationService;
|
||||
import org.dspace.services.factory.DSpaceServicesFactory;
|
||||
import org.dspace.workflow.WorkflowException;
|
||||
import org.dspace.xmlworkflow.factory.XmlWorkflowServiceFactory;
|
||||
import org.dspace.xmlworkflow.state.Step;
|
||||
@@ -40,6 +42,9 @@ import org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItem;
|
||||
public class SingleUserReviewAction extends ProcessingAction {
|
||||
private static final Logger log = LogManager.getLogger(SingleUserReviewAction.class);
|
||||
|
||||
private final ConfigurationService configurationService
|
||||
= DSpaceServicesFactory.getInstance().getConfigurationService();
|
||||
|
||||
public static final int OUTCOME_REJECT = 1;
|
||||
|
||||
protected static final String SUBMIT_DECLINE_TASK = "submit_decline_task";
|
||||
@@ -95,6 +100,9 @@ public class SingleUserReviewAction extends ProcessingAction {
|
||||
public List<String> getOptions() {
|
||||
List<String> options = new ArrayList<>();
|
||||
options.add(SUBMIT_APPROVE);
|
||||
if (configurationService.getBooleanProperty("workflow.reviewer.file-edit", false)) {
|
||||
options.add(SUBMIT_EDIT_METADATA);
|
||||
}
|
||||
options.add(SUBMIT_REJECT);
|
||||
options.add(SUBMIT_DECLINE_TASK);
|
||||
return options;
|
||||
|
Reference in New Issue
Block a user