Package org.mycore.access.strategies
Class MCRObjectBaseStrategy
java.lang.Object
org.mycore.access.strategies.MCRObjectBaseStrategy
- All Implemented Interfaces:
MCRAccessCheckStrategy
,MCRCombineableAccessCheckStrategy
Use this class if you want to have a fallback to some default access rules.
These are the rules that will be checked against if available
{id}
, e.g. "MyCoRe_mods_12345678"default_{baseId}
, e.g. "default_MyCoRe_mods"default_{objectType}
, e.g. "default_mods"default
MCRObjectTypeStrategy
but step 2 is inserted here.- Version:
- $Revision: 26482 $ $Date: 2013-03-13 10:16:11 +0100 (Mi, 13. Mär 2013) $
- Author:
- Thomas Scheffler (yagee), Jens Kupferschmidt
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkPermission
(String id, String permission) determines whether the current user has the permission to perform a certain action.boolean
hasRuleMapping
(String id, String permission) Checks if this strategy has a rule mapping defined.
-
Constructor Details
-
MCRObjectBaseStrategy
public MCRObjectBaseStrategy()
-
-
Method Details
-
checkPermission
Description copied from interface:MCRAccessCheckStrategy
determines whether the current user has the permission to perform a certain action.- Specified by:
checkPermission
in interfaceMCRAccessCheckStrategy
- Parameters:
id
- the MCRObjectID of the objectpermission
- the access permission for the rule- Returns:
- true if the access is allowed otherwise it return
- See Also:
-
hasRuleMapping
Description copied from interface:MCRCombineableAccessCheckStrategy
Checks if this strategy has a rule mapping defined. Can be used by other more complex strategies that require this information to decide if this strategy should be used.- Specified by:
hasRuleMapping
in interfaceMCRCombineableAccessCheckStrategy
- Parameters:
id
- a possible MCRObjectID of the object or any other "id"permission
- the access permission for the rule- Returns:
- true if there is a mapping to a rule defined
-