Class UserDirectoryContentAccessController
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
-
- org.ametys.plugins.core.impl.right.AbstractHierarchicalAccessController<AmetysObject>
-
- org.ametys.plugins.userdirectory.rights.UserDirectoryContentAccessController
-
- All Implemented Interfaces:
AccessController,LogEnabled,Initializable,Component,Contextualizable,Serviceable
public class UserDirectoryContentAccessController extends AbstractHierarchicalAccessController<AmetysObject> implements Contextualizable
AccessControllerfor a User directoryContent
-
-
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 Modifier and Type Field Description protected ContentTypesHelper_contentTypeHelperThe content type helperprotected Context_contextThe avalon contextprotected OrganisationChartPageHandler_organisationChartPageHandlerThe organisation chart page handlerprotected AmetysObjectResolver_resolverAmetys Object Resolverprotected UserDirectoryHelper_userDirectoryHelperThe user directory helper-
Fields inherited from class org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
__ANONYMOUS_USER_IDENTITY, __ANY_CONTECTED_USER_IDENTITY, _cacheManager, _profileAssignmentStorageEP, _rightProfileDAO
-
-
Constructor Summary
Constructors Constructor Description UserDirectoryContentAccessController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Set<? extends Object>_convertWorkspaceToRootRightContexts(Set<Object> workspacesContexts)Get the current workspaces contexts and turn it into root contexts in order to allow methods hasXXXAnyPermissionOnWorkspace to workprotected Set<AmetysObject>_getParents(AmetysObject object)Gets the parents of the object.voidcontextualize(Context context)booleanisSupported(Object object)Returns true if this access controller supports the given objectvoidservice(ServiceManager manager)-
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
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_resolver
protected AmetysObjectResolver _resolver
Ametys Object Resolver
-
_organisationChartPageHandler
protected OrganisationChartPageHandler _organisationChartPageHandler
The organisation chart page handler
-
_contentTypeHelper
protected ContentTypesHelper _contentTypeHelper
The content type helper
-
_userDirectoryHelper
protected UserDirectoryHelper _userDirectoryHelper
The user directory helper
-
-
Constructor Detail
-
UserDirectoryContentAccessController
public UserDirectoryContentAccessController()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractProfileStorageBasedAccessController- Throws:
ServiceException
-
isSupported
public boolean isSupported(Object object)
Description copied from interface:AccessControllerReturns true if this access controller supports the given object- Specified by:
isSupportedin interfaceAccessController- Parameters:
object- The object to test- Returns:
- true if this access controller supports the given object
-
_getParents
protected Set<AmetysObject> _getParents(AmetysObject object)
Description copied from class:AbstractHierarchicalAccessControllerGets the parents of the object. Must return null when the object is the "root" (where "root" means here the root of the hierarchy of the access controller)- Specified by:
_getParentsin classAbstractHierarchicalAccessController<AmetysObject>- Parameters:
object- The object- Returns:
- the parents of the object, or null if the object is the "root" of the hierarchy
-
_convertWorkspaceToRootRightContexts
protected Set<? extends Object> _convertWorkspaceToRootRightContexts(Set<Object> workspacesContexts)
Description copied from class:AbstractProfileStorageBasedAccessControllerGet the current workspaces contexts and turn it into root contexts in order to allow methods hasXXXAnyPermissionOnWorkspace to work- Specified by:
_convertWorkspaceToRootRightContextsin 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
-
-