Package org.dspace.app.rest.security
Class EPersonRestPermissionEvaluatorPlugin
- java.lang.Object
-
- org.dspace.app.rest.security.RestObjectPermissionEvaluatorPlugin
-
- org.dspace.app.rest.security.EPersonRestPermissionEvaluatorPlugin
-
- All Implemented Interfaces:
RestPermissionEvaluatorPlugin
@Component public class EPersonRestPermissionEvaluatorPlugin extends RestObjectPermissionEvaluatorPlugin
An authenticated user is allowed to view, update or delete his or her own data. ThisRestPermissionEvaluatorPluginimplements that requirement.
-
-
Constructor Summary
Constructors Constructor Description EPersonRestPermissionEvaluatorPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasDSpacePermission(org.springframework.security.core.Authentication authentication, Serializable targetId, String targetType, DSpaceRestPermission permission)Plugins must implement this method to receiveRestPermissionEvaluatorPluginhasPermission requests.booleanhasPatchPermission(org.springframework.security.core.Authentication authentication, Serializable targetId, String targetType, Patch patch)Checks permissions forPatchrequests.-
Methods inherited from class org.dspace.app.rest.security.RestObjectPermissionEvaluatorPlugin
hasPermission, hasPermission
-
-
-
-
Method Detail
-
hasDSpacePermission
public boolean hasDSpacePermission(org.springframework.security.core.Authentication authentication, Serializable targetId, String targetType, DSpaceRestPermission permission)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 manipulatepermission- 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.
-
hasPatchPermission
public boolean hasPatchPermission(org.springframework.security.core.Authentication authentication, Serializable targetId, String targetType, Patch patch)Description copied from class:RestObjectPermissionEvaluatorPluginChecks permissions forPatchrequests. Override the default implementation in plugins that require this capability.- Overrides:
hasPatchPermissionin 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 manipulatepatch- ThePatchinstance- Returns:
- true if the user is allowed to perform the action described by the permission. False otherwise
-
-