Interface AuthorizationFeatureService

All Known Implementing Classes:
AuthorizationFeatureServiceImpl

public interface AuthorizationFeatureService
This service provides access to the Authorization Features and check if the feature is allowed or not in a specific context and object.
Author:
Andrea Bollini (andrea.bollini at 4science.it)
  • Method Details

    • isAuthorized

      boolean isAuthorized(Context context, AuthorizationFeature feature, BaseObjectRest object) throws SQLException, SearchServiceException
      Check if the eperson in the provided context, or the anonymous user if not loggedin, has access to the requested feature for the requested object
      Parameters:
      context - the DSpace Context
      feature - the Authorization Feature to check
      object - the object target by the feature. Passing a null object always return false. To check repository wide feature pass the SiteRest object
      Returns:
      true if the user associated with the context has access to the feature
      Throws:
      SQLException
      SearchServiceException
    • findAll

      Get all the authorization features defined in the system
      Returns:
      a list of all the authorization features
    • find

      Get the authorization feature by its unique name
      Parameters:
      name - the authorization feature unique name
      Returns:
      the authorization feature if any
    • findByResourceType

      List<AuthorizationFeature> findByResourceType(String categoryDotModel)
      Return all the feature that apply to the rest resources identified by the uniqueType string category.model
      Parameters:
      categoryDotModel -
      Returns: