Class LinkDirectoryAccessController
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
org.ametys.plugins.linkdirectory.right.LinkDirectoryAccessController
- All Implemented Interfaces:
AccessController
,LogEnabled
,PluginAware
,Initializable
,Contextualizable
,Serviceable
public class LinkDirectoryAccessController
extends AbstractProfileStorageBasedAccessController
implements Contextualizable
AccessController
for a Link
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
AbstractProfileStorageBasedAccessController.CacheKind, AbstractProfileStorageBasedAccessController.PermissionDetails
Nested classes/interfaces inherited from interface org.ametys.core.right.AccessController
AccessController.AccessResult, AccessController.ExplanationObject, AccessController.Permission
-
Field Summary
Fields inherited from class org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
__ANONYMOUS_USER_IDENTITY, __ANY_CONTECTED_USER_IDENTITY, _cacheManager, _groupManager, _profileAssignmentStorageEP, _rightProfileDAO
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription_convertWorkspaceToRootRightContexts
(Set<Object> workspacesContexts) Get the current workspaces contexts and turn it into root contexts in order to allow methods hasXXXAnyPermissionOnWorkspace to workprotected boolean
_isSupportedStoredContext
(Object storedObject) Determine if a stored context is handled by this controller.void
contextualize
(Context context) getObjectCategory
(Object object) Get a label classifying the object handled by this access controllergetObjectLabel
(Object object) Get a label describing the object handled by this access controllerprotected I18nizableText
getObjectLabelForExplanation
(Object object) Get the label describing the object in the explanation sentence.boolean
isSupported
(Object object) Returns true if this access controller supports the given objectMethods inherited from class org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
_buildExplanation, _convertContext, _explainPermission, _explainPermissionForAnonymous, _explainPermissionForAnyConnectedUser, _getAccessExplanationI18nKey, _getExplanationI18nParams, _getExplanationI18nText, _getPermission, _getPermissionByGroup, _getPermissionByUser, _getPermissionDetails, _getPermissionDetailsForAnonymous, _getPermissionDetailsForAnyConnectedUser, _getPermissionForAnonymous, _getPermissionForAnyConnectedUser, _hasRightResultInFirstCache, _hasRightResultInSecondCache, _putInFirstCache, _putInSecondCache, _unconvertContext, explainAllPermissions, explainPermission, explainPermissionForAnonymous, explainPermissionForAnyConnectedUser, explainReadAccessPermission, explainReadAccessPermissionForAnonymous, explainReadAccessPermissionForAnyConnectedUser, getId, getPermission, getPermissionByGroup, getPermissionByRight, getPermissionByUser, getPermissionForAnonymous, getPermissionForAnyConnectedUser, getReadAccessPermission, getReadAccessPermissionByGroup, getReadAccessPermissionByUser, getReadAccessPermissionForAnonymous, getReadAccessPermissionForAnyConnectedUser, hasAnonymousAnyPermissionOnWorkspace, hasAnonymousAnyReadAccessPermissionOnWorkspace, hasAnyConnectedUserAnyPermissionOnWorkspace, hasAnyConnectedUserAnyReadAccessPermissionOnWorkspace, hasUserAnyPermissionOnWorkspace, hasUserAnyReadAccessPermissionOnWorkspace, initialize, service, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.core.right.AccessController
getExplanationObject, getObjectPriority, getStandardAccessExplanation
-
Field Details
-
LINK_DIRECTORY_CONTEXT_CATEGORY
the link directory context category
-
-
Constructor Details
-
LinkDirectoryAccessController
public LinkDirectoryAccessController()
-
-
Method Details
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
isSupported
Description copied from interface:AccessController
Returns true if this access controller supports the given object- Specified by:
isSupported
in interfaceAccessController
- Parameters:
object
- The object to test- Returns:
- true if this access controller supports the given object
-
_isSupportedStoredContext
Description copied from class:AbstractProfileStorageBasedAccessController
Determine if a stored context is handled by this controller. Default implementation returns the result ofAccessController.isSupported(Object)
as no conversion is done by default on object context before storage (seeAbstractProfileStorageBasedAccessController._convertContext(Object)
)- Overrides:
_isSupportedStoredContext
in classAbstractProfileStorageBasedAccessController
- Parameters:
storedObject
- a stored object- Returns:
- true if the context is supported
-
_convertWorkspaceToRootRightContexts
protected Set<? extends Object> _convertWorkspaceToRootRightContexts(Set<Object> workspacesContexts) Description copied from class:AbstractProfileStorageBasedAccessController
Get the current workspaces contexts and turn it into root contexts in order to allow methods hasXXXAnyPermissionOnWorkspace to work- Specified by:
_convertWorkspaceToRootRightContexts
in classAbstractProfileStorageBasedAccessController
- Parameters:
workspacesContexts
- The workspace contexts. Such as '/${WorkspaceName}', '/admin'- Returns:
- A null or empty set if the current AccessController does not apply to any workspace context, or the root object where ProfileAssignmentStorageExtension should start looking at to find any permission
-
getObjectLabelForExplanation
Description copied from class:AbstractProfileStorageBasedAccessController
Get the label describing the object in the explanation sentence.- Overrides:
getObjectLabelForExplanation
in classAbstractProfileStorageBasedAccessController
- Parameters:
object
- the object that granted the right- Returns:
- the label
- Throws:
RightsException
- when the object is not supported by the controller
-
getObjectLabel
Description copied from interface:AccessController
Get a label describing the object handled by this access controller- Specified by:
getObjectLabel
in interfaceAccessController
- Parameters:
object
- the object- Returns:
- the label
- Throws:
RightsException
-
getObjectCategory
Description copied from interface:AccessController
Get a label classifying the object handled by this access controller- Specified by:
getObjectCategory
in interfaceAccessController
- Parameters:
object
- the object- Returns:
- the label
-