Class WorkspaceAccessController
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
org.ametys.plugins.core.impl.right.AbstractHierarchicalAccessController<String>
org.ametys.plugins.core.impl.right.StringHierarchicalAccessController
org.ametys.plugins.core.impl.right.WorkspaceAccessController
- All Implemented Interfaces:
AccessController
,LogEnabled
,Initializable
,Component
,Configurable
,Contextualizable
,Serviceable
- Direct Known Subclasses:
WorkspaceAccessController
,WorkspaceSwitchedAccessController
public class WorkspaceAccessController
extends StringHierarchicalAccessController
implements Contextualizable
AccessController
for a workspace context objects (strings starting with "/" + workspace name).-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
AbstractProfileStorageBasedAccessController.CacheKind
Nested classes/interfaces inherited from interface org.ametys.core.right.AccessController
AccessController.AccessResult
-
Field Summary
Fields inherited from class org.ametys.plugins.core.impl.right.StringHierarchicalAccessController
_prefixes, _reverseWorkspaceMather, _workspaceMatcher, SEPARATOR
Fields inherited from class org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
__ANONYMOUS_USER_IDENTITY, __ANY_CONTECTED_USER_IDENTITY, _cacheManager, _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 workvoid
configure
(Configuration configuration) void
contextualize
(Context context) Get the prefix of the path acceptedGet the prefix of the path acceptedMethods inherited from class org.ametys.plugins.core.impl.right.StringHierarchicalAccessController
_getParents, isSupported
Methods inherited from class org.ametys.plugins.core.impl.right.AbstractHierarchicalAccessController
_getPermission, _getPermissionByGroup, _getPermissionByUser, _getPermissionForAnonymous, _getPermissionForAnyConnectedUser, getPermissionByRight, isInheritanceDisallowed
Methods inherited from class org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
_convertContext, _hasRightResultInFirstCache, _hasRightResultInSecondCache, _putInFirstCache, _putInSecondCache, getPermission, getPermissionByGroup, getPermissionByUser, getPermissionForAnonymous, getPermissionForAnyConnectedUser, getReadAccessPermission, getReadAccessPermissionByGroup, getReadAccessPermissionByUser, getReadAccessPermissionForAnonymous, getReadAccessPermissionForAnyConnectedUser, hasAnonymousAnyPermissionOnWorkspace, hasAnonymousAnyReadAccessPermissionOnWorkspace, hasAnyConnectedUserAnyPermissionOnWorkspace, hasAnyConnectedUserAnyReadAccessPermissionOnWorkspace, hasUserAnyPermissionOnWorkspace, hasUserAnyReadAccessPermissionOnWorkspace, initialize, service
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_context
The avalon context
-
-
Constructor Details
-
WorkspaceAccessController
public WorkspaceAccessController()
-
-
Method Details
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classStringHierarchicalAccessController
- Throws:
ConfigurationException
-
getRootPrefixes
Description copied from class:StringHierarchicalAccessController
Get the prefix of the path accepted- Overrides:
getRootPrefixes
in classStringHierarchicalAccessController
- Returns:
- The non-null and non-empty prefixes, starting by '/'
-
getSupportedPrefixes
Description copied from class:StringHierarchicalAccessController
Get the prefix of the path accepted- Overrides:
getSupportedPrefixes
in classStringHierarchicalAccessController
- Returns:
- The non-null and non-empty prefixes, starting by '/'
-
_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- Overrides:
_convertWorkspaceToRootRightContexts
in classStringHierarchicalAccessController
- 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
-