Package org.ametys.odf.rights
Class ODFContextualizedContentHierarchicalAccessController
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
org.ametys.plugins.core.impl.right.AbstractHierarchicalWithPermissionContextAccessController<ODFRightHelper.ContextualizedContent,ODFRightHelper.ContextualizedPermissionContext>
org.ametys.odf.rights.ODFContextualizedContentHierarchicalAccessController
- All Implemented Interfaces:
AccessController
,LogEnabled
,PluginAware
,Supporter<Object>
,Initializable
,Serviceable
public class ODFContextualizedContentHierarchicalAccessController
extends AbstractHierarchicalWithPermissionContextAccessController<ODFRightHelper.ContextualizedContent,ODFRightHelper.ContextualizedPermissionContext>
AccessController
for a ODF ODFRightHelper.ContextualizedContent
based on stored ACL-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.core.impl.right.AbstractHierarchicalWithPermissionContextAccessController
AbstractHierarchicalWithPermissionContextAccessController.HierarchicalPermissionDetails
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
FieldsModifier and TypeFieldDescriptionprotected ContentHelper
The helper for contentsprotected ODFContentsTreeHelper
The ODF contents tree helperprotected ODFHelper
The helper for root contentprotected ODFRightHelper
The right helper for ODF contentsprotected AmetysObjectResolver
Ametys Object Resolverstatic final I18nizableText
the odf context categoryFields inherited from class org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
__ANONYMOUS_USER_IDENTITY, __ANY_CONTECTED_USER_IDENTITY, _cacheManager, _groupManager, _profileAssignmentStorageEP, _rightProfileDAO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
_convertContext
(Object initialContext) For methods getXXXXPermissionYYY allow to have a modification of the context before transferring it to the profile assignment storage extension point The default implemenation keep the context as it is_convertWorkspaceToRootRightContexts
(Set<Object> workspacesContexts) Get the current workspaces contexts and turn it into root contexts in order to allow methods hasXXXAnyPermissionOnWorkspace to workprotected Set
<ODFRightHelper.ContextualizedContent> _getParents
(ODFRightHelper.ContextualizedContent object, ODFRightHelper.ContextualizedPermissionContext permissionCtx) Gets the parents of the object._getPermissionContext
(ODFRightHelper.ContextualizedContent contextualizedContent) Get the permission 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 controllervoid
service
(ServiceManager manager) boolean
Check if an element is supportedMethods inherited from class org.ametys.plugins.core.impl.right.AbstractHierarchicalWithPermissionContextAccessController
_getAllPermissionsDetailsByGroup, _getAllPermissionsDetailsByGroup, _getAllPermissionsDetailsByUser, _getAllPermissionsDetailsByUser, _getAllPermissionsDetailsForAnonymous, _getAllPermissionsDetailsForAnonymous, _getAllPermissionsDetailsForAnyConnected, _getAllPermissionsDetailsForAnyConnected, _getExplanationI18nText, _getPermission, _getPermission, _getPermissionByGroup, _getPermissionByGroup, _getPermissionByUser, _getPermissionByUser, _getPermissionDetails, _getPermissionDetails, _getPermissionDetailsForAnonymous, _getPermissionDetailsForAnonymous, _getPermissionDetailsForAnyConnectedUser, _getPermissionDetailsForAnyConnectedUser, _getPermissionForAnonymous, _getPermissionForAnonymous, _getPermissionForAnyConnectedUser, _getPermissionForAnyConnectedUser, getPermissionByRight, getPermissionByRight, isInheritanceAllowed
Methods inherited from class org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
_buildExplanation, _explainPermission, _explainPermissionForAnonymous, _explainPermissionForAnyConnectedUser, _getAccessExplanationI18nKey, _getExplanationI18nParams, _hasRightResultInFirstCache, _hasRightResultInSecondCache, _isSupportedStoredContext, _putInFirstCache, _putInSecondCache, _unconvertContext, explainAllPermissions, explainAllPermissionsByGroup, explainAllPermissionsByUser, explainAllPermissionsForAnonymous, explainAllPermissionsForAnyConnected, explainPermission, explainPermissionForAnonymous, explainPermissionForAnyConnectedUser, explainReadAccessPermission, explainReadAccessPermissionForAnonymous, explainReadAccessPermissionForAnyConnectedUser, getId, getObjectLabelForExplanation, getPermission, getPermissionByGroup, getPermissionByUser, getPermissionForAnonymous, getPermissionForAnyConnectedUser, getReadAccessPermission, getReadAccessPermissionByGroup, getReadAccessPermissionByUser, getReadAccessPermissionForAnonymous, getReadAccessPermissionForAnyConnectedUser, hasAnonymousAnyPermissionOnWorkspace, hasAnonymousAnyReadAccessPermissionOnWorkspace, hasAnyConnectedUserAnyPermissionOnWorkspace, hasAnyConnectedUserAnyReadAccessPermissionOnWorkspace, hasUserAnyPermissionOnWorkspace, hasUserAnyReadAccessPermissionOnWorkspace, initialize, 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
-
Field Details
-
ODF_CONTEXT_CATEGORY
the odf context category -
_odfHelper
The helper for root content -
_contentHelper
The helper for contents -
_resolver
Ametys Object Resolver -
_odfRightHelper
The right helper for ODF contents -
_odfContentTreeHelper
The ODF contents tree helper
-
-
Constructor Details
-
ODFContextualizedContentHierarchicalAccessController
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractProfileStorageBasedAccessController
- Throws:
ServiceException
-
supports
Description copied from interface:Supporter
Check if an element is supported- Parameters:
object
- The element- Returns:
true
if the element is supported,false
otherwise
-
_getParents
protected Set<ODFRightHelper.ContextualizedContent> _getParents(ODFRightHelper.ContextualizedContent object, ODFRightHelper.ContextualizedPermissionContext permissionCtx) Description copied from class:AbstractHierarchicalWithPermissionContextAccessController
Gets 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:
_getParents
in classAbstractHierarchicalWithPermissionContextAccessController<ODFRightHelper.ContextualizedContent,
ODFRightHelper.ContextualizedPermissionContext> - Parameters:
object
- The objectpermissionCtx
- The permission context- Returns:
- the parents of the object, or null if the object is the "root" of the hierarchy
-
_getPermissionContext
protected ODFRightHelper.ContextualizedPermissionContext _getPermissionContext(ODFRightHelper.ContextualizedContent contextualizedContent) Description copied from class:AbstractHierarchicalWithPermissionContextAccessController
Get the permission context. By default the permission context is the initial object context- Overrides:
_getPermissionContext
in classAbstractHierarchicalWithPermissionContextAccessController<ODFRightHelper.ContextualizedContent,
ODFRightHelper.ContextualizedPermissionContext> - Parameters:
contextualizedContent
- the initial object context- Returns:
- the permission context.
-
_convertContext
Description copied from class:AbstractProfileStorageBasedAccessController
For methods getXXXXPermissionYYY allow to have a modification of the context before transferring it to the profile assignment storage extension point The default implemenation keep the context as it is- Overrides:
_convertContext
in classAbstractProfileStorageBasedAccessController
- Parameters:
initialContext
- The right context that is supported- Returns:
- the context modified
-
_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
-
getObjectLabel
Description copied from interface:AccessController
Get a label describing the object handled by this access controller- Parameters:
object
- the object- Returns:
- the label
-
getObjectCategory
Description copied from interface:AccessController
Get a label classifying the object handled by this access controller- Parameters:
object
- the object- Returns:
- the label
-