diff --git a/orcid-api-web/src/main/java/org/orcid/api/memberV2/server/delegator/impl/MemberV2ApiServiceVersionedDelegatorImpl.java b/orcid-api-web/src/main/java/org/orcid/api/memberV2/server/delegator/impl/MemberV2ApiServiceVersionedDelegatorImpl.java index fbbb652e435..42bad3e6597 100644 --- a/orcid-api-web/src/main/java/org/orcid/api/memberV2/server/delegator/impl/MemberV2ApiServiceVersionedDelegatorImpl.java +++ b/orcid-api-web/src/main/java/org/orcid/api/memberV2/server/delegator/impl/MemberV2ApiServiceVersionedDelegatorImpl.java @@ -602,15 +602,7 @@ private Object downgradeObject(Object entity) { } private void checkProfileStatus(String orcid, boolean readOperation) { - try { - orcidSecurityManager.checkProfile(orcid); - } catch (DeactivatedException e) { - // If it is a read operation, ignore the deactivated status since we - // are going to return the empty element with the deactivation date - if (!readOperation) { - throw e; - } - } + orcidSecurityManager.checkProfile(orcid); } } \ No newline at end of file diff --git a/orcid-pub-web/src/main/java/org/orcid/api/publicV2/server/delegator/impl/PublicV2ApiServiceVersionedDelegatorImpl.java b/orcid-pub-web/src/main/java/org/orcid/api/publicV2/server/delegator/impl/PublicV2ApiServiceVersionedDelegatorImpl.java index ebb03f3da87..f7aa0bbc8e5 100644 --- a/orcid-pub-web/src/main/java/org/orcid/api/publicV2/server/delegator/impl/PublicV2ApiServiceVersionedDelegatorImpl.java +++ b/orcid-pub-web/src/main/java/org/orcid/api/publicV2/server/delegator/impl/PublicV2ApiServiceVersionedDelegatorImpl.java @@ -7,7 +7,6 @@ import javax.ws.rs.core.Response; import org.orcid.api.publicV2.server.delegator.PublicV2ApiServiceDelegator; -import org.orcid.core.exception.DeactivatedException; import org.orcid.core.manager.OrcidSecurityManager; import org.orcid.core.manager.ProfileEntityCacheManager; import org.orcid.core.version.V2Convertible; @@ -282,11 +281,7 @@ private Response downgradeResponse(Response response) { } private void checkProfileStatus(String orcid) { - try { - orcidSecurityManager.checkProfile(orcid); - } catch(DeactivatedException e) { - // Ignore the DeactivatedException since we should be able to return the empty element - } + orcidSecurityManager.checkProfile(orcid); } @SuppressWarnings({ "rawtypes", "unchecked" }) diff --git a/orcid-pub-web/src/main/java/org/orcid/api/publicV3/server/delegator/impl/PublicV3ApiServiceDelegatorImpl.java b/orcid-pub-web/src/main/java/org/orcid/api/publicV3/server/delegator/impl/PublicV3ApiServiceDelegatorImpl.java index dc6e08ee382..783c9db5272 100644 --- a/orcid-pub-web/src/main/java/org/orcid/api/publicV3/server/delegator/impl/PublicV3ApiServiceDelegatorImpl.java +++ b/orcid-pub-web/src/main/java/org/orcid/api/publicV3/server/delegator/impl/PublicV3ApiServiceDelegatorImpl.java @@ -1,7 +1,5 @@ package org.orcid.api.publicV3.server.delegator.impl; -import static org.orcid.core.api.OrcidApiConstants.STATUS_OK_MESSAGE; - import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; @@ -17,7 +15,6 @@ import org.orcid.api.common.writer.citeproc.V3WorkToCiteprocTranslator; import org.orcid.api.publicV3.server.delegator.PublicV3ApiServiceDelegator; import org.orcid.api.publicV3.server.security.PublicAPISecurityManagerV3; -import org.orcid.core.exception.DeactivatedException; import org.orcid.core.exception.OrcidBadRequestException; import org.orcid.core.exception.OrcidNoResultException; import org.orcid.core.exception.SearchStartParameterLimitExceededException; @@ -927,11 +924,7 @@ public Response viewServiceSummary(String orcid, Long putCode) { } private void checkProfileStatus(String orcid) { - try { - orcidSecurityManager.checkProfile(orcid); - } catch(DeactivatedException e) { - // Ignore the DeactivatedException since we should be able to return the empty element - } + orcidSecurityManager.checkProfile(orcid); } @Override