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); }