Class WorkspaceSwitchedAccessController
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
org.ametys.plugins.core.impl.right.WorkspaceSwitchedAccessController
- All Implemented Interfaces:
AccessController
,LogEnabled
,Initializable
,Component
,Configurable
,Contextualizable
,Serviceable
Act as the WorksapceAccessController but also have a configured switching value when converting the variable ${WorkspaceName}. Such as 'repository' => 'admin'.
-
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
Modifier and TypeFieldDescriptionprotected String
The workspace to react onprotected String
The workspace to replace withFields inherited from class org.ametys.plugins.core.impl.right.WorkspaceAccessController
_context
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 TypeMethodDescriptionvoid
configure
(Configuration configuration) Get the prefix of the path acceptedGet the prefix of the path acceptedMethods inherited from class org.ametys.plugins.core.impl.right.WorkspaceAccessController
_convertWorkspaceToRootRightContexts, contextualize
Methods 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
-
_workspaceToMatch
The workspace to react on -
_workspaceToReplaceWith
The workspace to replace with
-
-
Constructor Details
-
WorkspaceSwitchedAccessController
public WorkspaceSwitchedAccessController()
-
-
Method Details
-
configure
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classWorkspaceAccessController
- Throws:
ConfigurationException
-
getRootPrefixes
Description copied from class:StringHierarchicalAccessController
Get the prefix of the path accepted- Overrides:
getRootPrefixes
in classWorkspaceAccessController
- 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 classWorkspaceAccessController
- Returns:
- The non-null and non-empty prefixes, starting by '/'
-