Package org.mycore.access
Interface MCRAccessInterface
- All Known Subinterfaces:
MCRRequestScopeACL
,MCRRuleAccessInterface
- All Known Implementing Classes:
MCRAccessBaseImpl
,MCRAccessControlSystem
,MCRFactsAccessSystem
public interface MCRAccessInterface
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkPermission
(String permission) determines whether the current user has the permission to perform a certain action.boolean
checkPermission
(String id, String permission) determines whether the current user has the permission to perform a certain action.boolean
checkPermission
(String id, String permission, MCRUserInformation userInfo) determines whether a given user has the permission to perform a certain action. no session data will be checked here.boolean
checkPermissionForUser
(String permission, MCRUserInformation userInfo) determines whether a given user has the permission to perform a certain action. no session data will be checked here.
-
Method Details
-
checkPermission
determines whether the current user has the permission to perform a certain action. All information regarding the current user is capsulated by aMCRSession
instance which can be retrieved byMCRSession currentSession = MCRSessionMgr.getCurrentSession();
This method is used for checking "a priori permissions" like "create-document" where a String ID does not exist yet- Parameters:
permission
- the permission/action to be granted, e.g. "create-document"- Returns:
- true if the permission is granted, else false
- See Also:
-
checkPermission
determines whether the current user has the permission to perform a certain action. -
checkPermissionForUser
determines whether a given user has the permission to perform a certain action. no session data will be checked here. This method is used for checking "a priori permissions" like "create-document" where a String ID does not exist yet- Parameters:
permission
- the permission/action to be granted, e.g. "create-document"userInfo
- the MCRUser, whose permissions are checked- Returns:
- true if the permission is granted, else false
-
checkPermission
determines whether a given user has the permission to perform a certain action. no session data will be checked here. The parameterid
serves as an identifier for the concrete underlying rule, e.g. a MCRObjectID.- Parameters:
id
- the ID-String of the objectpermission
- the permission/action to be granted, e.g. "read"userInfo
- the MCRUser, whose permissions are checked- Returns:
- true if the permission is granted, else false
-