public abstract class RestObjectPermissionEvaluatorPlugin extends Object implements RestPermissionEvaluatorPlugin
RestPermissionEvaluatorPlugin class that contains utility methods to
evaluate permissions for a Rest Object.| Constructor and Description |
|---|
RestObjectPermissionEvaluatorPlugin() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
hasDSpacePermission(org.springframework.security.core.Authentication authentication,
Serializable targetId,
String targetType,
DSpaceRestPermission restPermission)
Plugins must implement this method to receive
RestPermissionEvaluatorPlugin hasPermission
requests. |
boolean |
hasPatchPermission(org.springframework.security.core.Authentication authentication,
Serializable targetId,
String targetType,
Patch patch)
Checks permissions for
Patch requests. |
boolean |
hasPermission(org.springframework.security.core.Authentication authentication,
Object targetDomainObject,
Object permission)
Utility implementation to make the implementation of Rest Object Permission evaluator plugins more easy.
|
boolean |
hasPermission(org.springframework.security.core.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. |
public boolean hasPermission(org.springframework.security.core.Authentication authentication,
Object targetDomainObject,
Object permission)
hasPermission in interface RestPermissionEvaluatorPluginauthentication - represents the user in question. Should not be null.targetDomainObject - the domain object for which permissions should be
checked. May be null in which case implementations should return false, as the null
condition can be checked explicitly in the expression.permission - a representation of the DSpace action as supplied by the
expression system. This corresponds to the DSpace action. Not null.public boolean hasPermission(org.springframework.security.core.Authentication authentication,
Serializable targetId,
String targetType,
Object permission)
RestPermissionEvaluatorPluginAuthentication object) has the specified permission on
the target object with the provided identifier.hasPermission in interface RestPermissionEvaluatorPluginauthentication - 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 objectpublic boolean hasPatchPermission(org.springframework.security.core.Authentication authentication,
Serializable targetId,
String targetType,
Patch patch)
Patch requests. Override the default implementation in
plugins that require this capability.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 - The Patch instancepublic abstract boolean hasDSpacePermission(org.springframework.security.core.Authentication authentication,
Serializable targetId,
String targetType,
DSpaceRestPermission restPermission)
RestPermissionEvaluatorPlugin hasPermission
requests.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 manipulaterestPermission - Permission object that describes the action the user wants to perform on the target objectCopyright © 2019 DuraSpace. All rights reserved.