Class ModuleResourceAccessController
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
org.ametys.plugins.core.impl.right.AbstractHierarchicalWithPermissionContextAccessController<AmetysObject,AmetysObject>
org.ametys.plugins.core.impl.right.AbstractHierarchicalAccessController<AmetysObject>
org.ametys.plugins.explorer.rights.ResourceAccessController
org.ametys.plugins.workspaces.project.rights.accesscontroller.ModuleResourceAccessController
- All Implemented Interfaces:
AccessController,ProfileBasedAccessController,LogEnabled,PluginAware,Supporter<Object>,Initializable,Contextualizable,Serviceable
public class ModuleResourceAccessController
extends ResourceAccessController
implements Contextualizable
AccessController handling access to module resources
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.core.impl.right.AbstractHierarchicalWithPermissionContextAccessController
AbstractHierarchicalWithPermissionContextAccessController.HierarchicalPermissionDetailsNested classes/interfaces inherited from class org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
AbstractProfileStorageBasedAccessController.CacheKind, AbstractProfileStorageBasedAccessController.PermissionDetailsNested 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.explorer.rights.ResourceAccessController
_resourcesDAO, RESOURCE_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 TypeMethodDescription_convertWorkspaceToRootRightContexts(Set<Object> workspacesContexts) Get the current workspaces contexts and turn it into root contexts in order to allow methods hasXXXAnyPermissionOnWorkspace to workprotected I18nizableTextGet the i18n text for the explanation based on the provided detailsvoidcontextualize(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 I18nizableTextgetObjectLabelForExplanation(Object object) Get the label describing the object in the explanation sentence.protected booleanIndicate that this controller will always return false to hasXXXAnyPermissionOnWorkspace callvoidservice(ServiceManager manager) booleanCheck if an element is supportedMethods inherited from class org.ametys.plugins.explorer.rights.ResourceAccessController
_getParentsMethods inherited from class org.ametys.plugins.core.impl.right.AbstractHierarchicalAccessController
_getParentsMethods inherited from class org.ametys.plugins.core.impl.right.AbstractHierarchicalWithPermissionContextAccessController
_getAllPermissionsDetailsByGroup, _getAllPermissionsDetailsByGroup, _getAllPermissionsDetailsByUser, _getAllPermissionsDetailsByUser, _getAllPermissionsDetailsForAnonymous, _getAllPermissionsDetailsForAnonymous, _getAllPermissionsDetailsForAnyConnected, _getAllPermissionsDetailsForAnyConnected, _getPermission, _getPermission, _getPermissionByGroup, _getPermissionByGroup, _getPermissionByUser, _getPermissionByUser, _getPermissionContext, _getPermissionDetails, _getPermissionDetails, _getPermissionDetailsForAnonymous, _getPermissionDetailsForAnonymous, _getPermissionDetailsForAnyConnectedUser, _getPermissionDetailsForAnyConnectedUser, _getPermissionForAnonymous, _getPermissionForAnonymous, _getPermissionForAnyConnectedUser, _getPermissionForAnyConnectedUser, getPermissionByRight, getPermissionByRight, isInheritanceAllowedMethods inherited from class org.ametys.plugins.core.impl.right.AbstractProfileStorageBasedAccessController
_buildExplanation, _convertContext, _explainPermission, _explainPermissionForAnonymous, _explainPermissionForAnyConnectedUser, _getAccessExplanationI18nKey, _getExplanationI18nParams, _hasRightResultInFirstCache, _hasRightResultInSecondCache, _putInFirstCache, _putInSecondCache, _unconvertContext, explainAllPermissions, explainAllPermissionsByGroup, explainAllPermissionsByUser, explainAllPermissionsForAnonymous, explainAllPermissionsForAnyConnected, explainAllProfileUsesForAnonymousOnWorkspaces, explainAllProfileUsesForAnyConnectedOnWorkspaces, explainAllProfileUsesOnWorkspacesByGroups, explainAllProfileUsesOnWorkspacesByUser, explainPermission, explainPermissionForAnonymous, explainPermissionForAnyConnectedUser, explainReadAccessPermission, explainReadAccessPermissionForAnonymous, explainReadAccessPermissionForAnyConnectedUser, getId, getPermission, getPermissionByGroup, getPermissionByUser, getPermissionForAnonymous, getPermissionForAnyConnectedUser, getReadAccessPermission, getReadAccessPermissionByGroup, getReadAccessPermissionByUser, getReadAccessPermissionForAnonymous, getReadAccessPermissionForAnyConnectedUser, hasAnonymousAnyPermissionOnWorkspace, hasAnonymousAnyReadAccessPermissionOnWorkspace, hasAnyConnectedUserAnyPermissionOnWorkspace, hasAnyConnectedUserAnyReadAccessPermissionOnWorkspace, hasUserAnyPermissionOnWorkspace, hasUserAnyReadAccessPermissionOnWorkspace, initialize, setPluginInfoMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.core.right.AccessController
getExplanationObject, getObjectPriority
-
Constructor Details
-
ModuleResourceAccessController
public ModuleResourceAccessController()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classResourceAccessController- Throws:
ServiceException
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
supports
Description copied from interface:SupporterCheck if an element is supported- Specified by:
supportsin interfaceSupporter<Object>- Overrides:
supportsin classResourceAccessController- Parameters:
object- The element- Returns:
trueif the element is supported,falseotherwise
-
ignoreOnHasAnyPermission
Description copied from class:AbstractProfileStorageBasedAccessControllerIndicate that this controller will always return false to hasXXXAnyPermissionOnWorkspace call- Overrides:
ignoreOnHasAnyPermissionin classAbstractProfileStorageBasedAccessController- Returns:
- true to answer calls to hasXXXAnyPermissionOnWorkspace with false
-
_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- Overrides:
_convertWorkspaceToRootRightContextsin classResourceAccessController- 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
-
_getExplanationI18nText
protected I18nizableText _getExplanationI18nText(AbstractProfileStorageBasedAccessController.PermissionDetails details) Description copied from class:AbstractProfileStorageBasedAccessControllerGet the i18n text for the explanation based on the provided details- Overrides:
_getExplanationI18nTextin classAbstractHierarchicalWithPermissionContextAccessController<AmetysObject,AmetysObject> - Parameters:
details- the permission details- Returns:
- the explanation
-
getObjectLabelForExplanation
Description copied from class:AbstractProfileStorageBasedAccessControllerGet the label describing the object in the explanation sentence.- Overrides:
getObjectLabelForExplanationin classResourceAccessController- 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:AccessControllerGet a label describing the object handled by this access controller- Specified by:
getObjectLabelin interfaceAccessController- Overrides:
getObjectLabelin classResourceAccessController- Parameters:
object- the object- Returns:
- the label
- Throws:
RightsException
-
getObjectCategory
Description copied from interface:AccessControllerGet a label classifying the object handled by this access controller- Specified by:
getObjectCategoryin interfaceAccessController- Overrides:
getObjectCategoryin classResourceAccessController- Parameters:
object- the object- Returns:
- the label
-