From ee5b3d5dcf5f6435408cd5a2c8512aa13efa4577 Mon Sep 17 00:00:00 2001 From: Stefano Maffei Date: Fri, 20 Sep 2024 17:37:38 +0200 Subject: [PATCH] [LM-46] fix propery retrieval behavior --- .../app/rest/repository/ConfigurationRestRepository.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ConfigurationRestRepository.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ConfigurationRestRepository.java index c00703786a9..db9ba8c67f2 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ConfigurationRestRepository.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ConfigurationRestRepository.java @@ -62,9 +62,9 @@ public ConfigurationRestRepository(ConfigurationService configurationService) { @Override @PreAuthorize("permitAll()") public PropertyRest findOne(Context context, String property) { - if ((!exposedProperties.contains(property) && !isCurrentUserAdmin(context)) - || !configurationService.hasProperty(property) - || (isCurrentUserAdmin(context) && !adminRestrictedProperties.contains(property))) { + if (!configurationService.hasProperty(property) || + (adminRestrictedProperties.contains(property) && !isCurrentUserAdmin(context)) || + (!exposedProperties.contains(property) && !isCurrentUserAdmin(context))) { throw new ResourceNotFoundException("No such configuration property: " + property); }