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 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:
      hasDSpacePermission in class RestObjectPermissionEvaluatorPlugin
      Parameters:
      targetType - usagereport or usagereportsearch, so we know how to extract the UUID
      targetId - string to extract uuid from
      authentication - Authentication object providing user details of the authenticated user
      restPermission - 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.