Interface AuthorizationFeatureService
-
- All Known Implementing Classes:
AuthorizationFeatureServiceImpl
public interface AuthorizationFeatureServiceThis 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AuthorizationFeaturefind(String name)Get the authorization feature by its unique nameList<AuthorizationFeature>findAll()Get all the authorization features defined in the systemList<AuthorizationFeature>findByResourceType(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 Detail
-
isAuthorized
boolean isAuthorized(Context context, AuthorizationFeature feature, BaseObjectRest object) throws SQLException
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:
SQLException
-
findAll
List<AuthorizationFeature> findAll()
Get all the authorization features defined in the system- Returns:
- a list of all the authorization features
-
find
AuthorizationFeature find(String name)
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:
-
-