Package org.dspace.app.rest.security
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 TypeMethodDescriptionbooleanhasPermission(Authentication authentication, Serializable targetId, String targetType, Object permission) Check in the authenticated user (provided by theAuthenticationobject) has the specified permission on the target object with the provided identifier.booleanhasPermission(Authentication authentication, Object targetDomainObject, Object permission) Check in the authenticated user (provided by theAuthenticationobject) has the specified permission on the provided target object.
-
Method Details
-
hasPermission
Check in the authenticated user (provided by theAuthenticationobject) has the specified permission on the provided target object.- Parameters:
authentication- Authentication object providing user details of the authenticated usertargetDomainObject- The target object that the authenticated user wants to see 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.
-
hasPermission
boolean hasPermission(Authentication authentication, Serializable targetId, String targetType, Object permission) Check in the authenticated user (provided by theAuthenticationobject) has the specified permission on the target object with the provided identifier.- 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.
-