Skip to content

Commit

Permalink
71220: Configuration properties endpoint - PR feedback
Browse files Browse the repository at this point in the history
- fixes after merging with latest master
  • Loading branch information
peter-atmire committed Jun 5, 2020
1 parent 24ede37 commit a7aeb10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -11,13 +11,12 @@

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.dspace.app.rest.RestResourceController;
import org.springframework.hateoas.Identifiable;

/**
* This class acts as the REST representation of a DSpace configuration property.
* This class acts as a data holder for the PropertyResource
*/
public class PropertyRest extends RestAddressableModel implements Identifiable<String> {
public class PropertyRest extends BaseObjectRest<String> {
public static final String NAME = "property";
public static final String CATEGORY = RestAddressableModel.CONFIGURATION;

Expand Down
Expand Up @@ -18,6 +18,7 @@
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.rest.webmvc.ResourceNotFoundException;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Component;

/**
Expand Down Expand Up @@ -51,6 +52,7 @@ public ConfigurationRestRepository(ConfigurationService configurationService) {
* @return
*/
@Override
@PreAuthorize("permitAll()")
public PropertyRest findOne(Context context, String property) {
if (!exposedProperties.contains(property) || !configurationService.hasProperty(property)) {
throw new ResourceNotFoundException("No such configuration property: " + property);
Expand Down

0 comments on commit a7aeb10

Please sign in to comment.