diff --git a/dspace-api/src/main/java/org/dspace/correctiontype/ReinstateCorrectionType.java b/dspace-api/src/main/java/org/dspace/correctiontype/ReinstateCorrectionType.java index 5d025895c94f..0c8b265b6f1b 100644 --- a/dspace-api/src/main/java/org/dspace/correctiontype/ReinstateCorrectionType.java +++ b/dspace-api/src/main/java/org/dspace/correctiontype/ReinstateCorrectionType.java @@ -45,7 +45,8 @@ public class ReinstateCorrectionType implements CorrectionType, InitializingBean @Override public boolean isAllowed(Context context, Item targetItem) throws SQLException, AuthorizeException { authorizeService.authorizeAction(context, targetItem, Constants.READ); - return targetItem.isWithdrawn(); + long tot = qaEventService.countSourcesByTarget(context, targetItem.getID()); + return tot == 0 && targetItem.isWithdrawn(); } @Override diff --git a/dspace-api/src/main/java/org/dspace/correctiontype/WithdrawnCorrectionType.java b/dspace-api/src/main/java/org/dspace/correctiontype/WithdrawnCorrectionType.java index 91eab2c7d381..d66e0d4a8c3d 100644 --- a/dspace-api/src/main/java/org/dspace/correctiontype/WithdrawnCorrectionType.java +++ b/dspace-api/src/main/java/org/dspace/correctiontype/WithdrawnCorrectionType.java @@ -45,7 +45,8 @@ public class WithdrawnCorrectionType implements CorrectionType, InitializingBean @Override public boolean isAllowed(Context context, Item targetItem) throws AuthorizeException, SQLException { authorizeService.authorizeAction(context, targetItem, READ); - return targetItem.isArchived() && !targetItem.isWithdrawn(); + long tot = qaEventService.countSourcesByTarget(context, targetItem.getID()); + return tot == 0 && targetItem.isArchived() && !targetItem.isWithdrawn(); } @Override