Skip to content

Commit

Permalink
Merged in task/dspace-cris-2023_02_x/LM-46 (pull request DSpace#2778)
Browse files Browse the repository at this point in the history
[LM-46] fix propery retrieval behavior
  • Loading branch information
steph-ieffam committed Sep 23, 2024
2 parents 1cc8aed + 020268d commit beb4424
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit beb4424

Please sign in to comment.