Class AuthorizeServicePermissionEvaluatorPlugin

  • All Implemented Interfaces:
    RestPermissionEvaluatorPlugin

    @Component
    public class AuthorizeServicePermissionEvaluatorPlugin
    extends RestObjectPermissionEvaluatorPlugin
    DSpaceObjectPermissionEvaluatorPlugin will check persmissions based on the DSpace AuthorizeService. This service will validate if the authenticated user is allowed to perform an action on the given DSpace Object based on the resource policies attached to that DSpace object.
    • Constructor Detail

      • AuthorizeServicePermissionEvaluatorPlugin

        public AuthorizeServicePermissionEvaluatorPlugin()
    • Method Detail

      • hasDSpacePermission

        public boolean hasDSpacePermission​(org.springframework.security.core.Authentication authentication,
                                           Serializable targetId,
                                           String targetType,
                                           DSpaceRestPermission permission)
        Description copied from class: RestObjectPermissionEvaluatorPlugin
        Plugins must implement this method to receive RestPermissionEvaluatorPlugin hasPermission requests.
        Specified by:
        hasDSpacePermission in class RestObjectPermissionEvaluatorPlugin
        Parameters:
        authentication - Authentication object providing user details of the authenticated user
        targetId - Unique identifier of the target object the user wants to view or manipulate
        targetType - Type of the target object the users wants to view or manipulate
        permission - 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.