From 35f3cf022a8264a57608fb05ef1ed0fc124b4f82 Mon Sep 17 00:00:00 2001 From: Vincenzo Mecca Date: Fri, 27 Oct 2023 16:33:21 +0200 Subject: [PATCH] [CST-12350] Fixes overrides metadata in RegistrationData for auth users --- .../dspace/app/rest/converter/RegistrationDataConverter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/RegistrationDataConverter.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/RegistrationDataConverter.java index 5b742366b582..3ec5bfbf533c 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/RegistrationDataConverter.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/RegistrationDataConverter.java @@ -66,6 +66,9 @@ public RegistrationRest convert(RegistrationData registrationData, Projection pr EPerson ePerson = null; try { ePerson = accountService.getEPerson(context, registrationData.getToken()); + if (ePerson == null && registrationData.getRegistrationType().equals(RegistrationTypeEnum.ORCID)) { + ePerson = context.getCurrentUser(); + } } catch (SQLException | AuthorizeException e) { throw new RuntimeException(e); }