Package org.dspace.app.rest.security
Class UsageReportRestPermissionEvaluatorPlugin
java.lang.Object
org.dspace.app.rest.security.RestObjectPermissionEvaluatorPlugin
org.dspace.app.rest.security.UsageReportRestPermissionEvaluatorPlugin
- All Implemented Interfaces:
RestPermissionEvaluatorPlugin
@Component
public class UsageReportRestPermissionEvaluatorPlugin
extends RestObjectPermissionEvaluatorPlugin
This class will handle Permissions for the
UsageReportRest object and its calls- Author:
- Maria Verdonck (Atmire) on 11/06/2020
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasDSpacePermission(Authentication authentication, Serializable targetId, String targetType, DSpaceRestPermission restPermission) Responsible for checking whether or not the user has used a valid request (valid UUID in /usagereports/{ UUID_ReportID} or in /usagereports/search/object?Methods inherited from class org.dspace.app.rest.security.RestObjectPermissionEvaluatorPlugin
hasPatchPermission, hasPermission, hasPermission
-
Constructor Details
-
UsageReportRestPermissionEvaluatorPlugin
public UsageReportRestPermissionEvaluatorPlugin()
-
-
Method Details
-
hasDSpacePermission
public boolean hasDSpacePermission(Authentication authentication, Serializable targetId, String targetType, DSpaceRestPermission restPermission) Responsible for checking whether or not the user has used a valid request (valid UUID in /usagereports/{ UUID_ReportID} or in /usagereports/search/object?uri={uri-ending-in/UUID} and whether or not the used has the given (READ) rights on the corresponding DSO.- Specified by:
hasDSpacePermissionin classRestObjectPermissionEvaluatorPlugin- Parameters:
targetType- usagereport or usagereportsearch, so we know how to extract the UUIDtargetId- string to extract uuid fromauthentication- Authentication object providing user details of the authenticated userrestPermission- 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.
-