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 Summary
Modifier and TypeMethodDescriptionGet the authorization feature by its unique namefindAll()Get all the authorization features defined in the systemfindByResourceType(String categoryDotModel) Return all the feature that apply to the rest resources identified by the uniqueType string category.modelbooleanisAuthorized(Context context, AuthorizationFeature feature, BaseObjectRest object) 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
-
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 Contextfeature- the Authorization Feature to checkobject- the object target by the feature. Passing a null object always return false. To check repository wide feature pass theSiteRestobject- Returns:
- true if the user associated with the context has access to the feature
- Throws:
SQLExceptionSearchServiceException
-
findAll
List<AuthorizationFeature> 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
Return all the feature that apply to the rest resources identified by the uniqueType string category.model- Parameters:
categoryDotModel-- Returns:
-