Interface RestPermissionEvaluatorPlugin

All Known Implementing Classes:
AdminRestPermissionEvaluatorPlugin, AuthorizeServicePermissionEvaluatorPlugin, BitstreamMetadataReadPermissionEvaluatorPlugin, ClaimedTaskRestPermissionEvaluatorPlugin, DSpaceObjectAdminPermissionEvaluatorPlugin, EPersonRestPermissionEvaluatorPlugin, GroupRestPermissionEvaluatorPlugin, OrcidHistorySendToOrcidRestPermissionEvaluatorPlugin, OrcidQueueAndHistoryRestPermissionEvaluatorPlugin, OrcidQueueSearchRestPermissionEvaluatorPlugin, PoolTaskRestPermissionEvaluatorPlugin, ProcessRestPermissionEvaluatorPlugin, QAEventRestPermissionEvaluatorPlugin, QASourceRestPermissionEvaluatorPlugin, ReadAuthorizationPermissionEvaluatorPlugin, ResearcherProfileRestPermissionEvaluatorPlugin, ResourcePolicyAdminPermissionEvalutatorPlugin, ResourcePolicyRestPermissionEvaluatorPlugin, RestObjectPermissionEvaluatorPlugin, SubmissionCCLicenseRestEvaluatorPlugin, SubmissionCCLicenseUrlRestPermissionEvaluatorPlugin, SubscriptionRestPermissionEvaluatorPlugin, SuggestionRestPermissionEvaluatorPlugin, SuggestionTargetRestPermissionEvaluatorPlugin, TemplateItemRestPermissionEvaluatorPlugin, UsageReportRestPermissionEvaluatorPlugin, VersionHistoryRestPermissionEvaluatorPlugin, VersionRestPatchPermissionEvaluatorPlugin, VersionRestPermissionEvaluatorPlugin, WorkflowRestPermissionEvaluatorPlugin, WorkspaceItemRestPermissionEvaluatorPlugin

public interface RestPermissionEvaluatorPlugin
Interface to define a permission evaluator plugin. These plugins are used in the DSpace PermissionEvaluator implementation DSpacePermissionEvaluator to check if an authenticated user has permission to perform a certain action on a certain object. If you implement a this interface in a Spring bean, it will be automatically taken into account when evaluating permissions.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    hasPermission(Authentication authentication, Serializable targetId, String targetType, Object permission)
    Check in the authenticated user (provided by the Authentication object) has the specified permission on the target object with the provided identifier.
    boolean
    hasPermission(Authentication authentication, Object targetDomainObject, Object permission)
    Check in the authenticated user (provided by the Authentication object) has the specified permission on the provided target object.
  • Method Details

    • hasPermission

      boolean hasPermission(Authentication authentication, Object targetDomainObject, Object permission)
      Check in the authenticated user (provided by the Authentication object) has the specified permission on the provided target object.
      Parameters:
      authentication - Authentication object providing user details of the authenticated user
      targetDomainObject - The target object that the authenticated user wants to see 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.
    • hasPermission

      boolean hasPermission(Authentication authentication, Serializable targetId, String targetType, Object permission)
      Check in the authenticated user (provided by the Authentication object) has the specified permission on the target object with the provided identifier.
      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.