Package org.dspace.app.rest.security
Class AdminRestPermissionEvaluatorPlugin
java.lang.Object
org.dspace.app.rest.security.RestObjectPermissionEvaluatorPlugin
org.dspace.app.rest.security.AdminRestPermissionEvaluatorPlugin
- All Implemented Interfaces:
RestPermissionEvaluatorPlugin
@Component
@Order(-2147483648)
public class AdminRestPermissionEvaluatorPlugin
extends RestObjectPermissionEvaluatorPlugin
Administrators are always allowed to perform any action on any DSpace object. This plugin will check if
the authenticated EPerson is an administrator of the provided target DSpace Object. If that is the case,
the authenticated EPerson is allowed to perform the requested action.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasDSpacePermission(Authentication authentication, Serializable targetId, String targetType, DSpaceRestPermission permission) Plugins must implement this method to receiveRestPermissionEvaluatorPluginhasPermission requests.Methods inherited from class org.dspace.app.rest.security.RestObjectPermissionEvaluatorPlugin
hasPatchPermission, hasPermission, hasPermission
-
Constructor Details
-
AdminRestPermissionEvaluatorPlugin
public AdminRestPermissionEvaluatorPlugin()
-
-
Method Details
-
hasDSpacePermission
public boolean hasDSpacePermission(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.
-