Package org.dspace.app.rest.security
Class SuggestionTargetRestPermissionEvaluatorPlugin
java.lang.Object
org.dspace.app.rest.security.RestObjectPermissionEvaluatorPlugin
org.dspace.app.rest.security.SuggestionTargetRestPermissionEvaluatorPlugin
- All Implemented Interfaces:
RestPermissionEvaluatorPlugin
@Component
public class SuggestionTargetRestPermissionEvaluatorPlugin
extends RestObjectPermissionEvaluatorPlugin
An authenticated user is allowed to view a suggestion summary
(SuggestionTarget) related to a Target object that they own
(as defined by "dspace.object.owner" metadata field)
See
RestPermissionEvaluatorPlugin for the inherited contract.- Author:
- Andrea Bollini (andrea.bollini at 4science.it)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasDSpacePermission(Authentication authentication, Serializable targetId, String targetType, DSpaceRestPermission restPermission) Plugins must implement this method to receiveRestPermissionEvaluatorPluginhasPermission requests.Methods inherited from class org.dspace.app.rest.security.RestObjectPermissionEvaluatorPlugin
hasPatchPermission, hasPermission, hasPermission
-
Constructor Details
-
SuggestionTargetRestPermissionEvaluatorPlugin
public SuggestionTargetRestPermissionEvaluatorPlugin()
-
-
Method Details
-
hasDSpacePermission
public boolean hasDSpacePermission(Authentication authentication, Serializable targetId, String targetType, DSpaceRestPermission restPermission) Description copied from class:RestObjectPermissionEvaluatorPluginPlugins must implement this method to receiveRestPermissionEvaluatorPluginhasPermission requests.- Specified by:
hasDSpacePermissionin classRestObjectPermissionEvaluatorPlugin- Parameters:
authentication- Authentication object providing user details of the authenticated usertargetId- Unique identifier of the target object the user wants to view or manipulatetargetType- Type of the target object the users wants to view or manipulaterestPermission- Permission object that describes the action the user wants to perform on the target object- Returns:
- true if the user is allowed to perform the action described by the permission. False otherwise.
-