Class AbstractAccessControlManager
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.AbstractAccessControlManager
-
- All Implemented Interfaces:
AccessControlManager
,org.apache.jackrabbit.api.security.JackrabbitAccessControlManager
,AccessControlConstants
@ProviderType public abstract class AbstractAccessControlManager extends java.lang.Object implements org.apache.jackrabbit.api.security.JackrabbitAccessControlManager, AccessControlConstants
Default implementation of theJackrabbitAccessControlManager
interface. This implementation covers both editing access control content by path and byPrincipal
resulting both in the same content structure.
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.AccessControlConstants
AC_NODETYPE_NAMES, ACE_PROPERTY_NAMES, MIX_REP_ACCESS_CONTROLLABLE, MIX_REP_REPO_ACCESS_CONTROLLABLE, NT_REP_ACE, NT_REP_ACL, NT_REP_DENY_ACE, NT_REP_GRANT_ACE, NT_REP_POLICY, NT_REP_RESTRICTIONS, PARAM_RESTRICTION_PROVIDER, POLICY_NODE_NAMES, REP_CURRENT, REP_GLOB, REP_GLOBS, REP_ITEM_NAMES, REP_NODE_PATH, REP_NT_NAMES, REP_POLICY, REP_PREFIXES, REP_PRINCIPAL_NAME, REP_PRIVILEGES, REP_REPO_POLICY, REP_RESTRICTIONS, REP_SUBTREES
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractAccessControlManager(@NotNull org.apache.jackrabbit.oak.api.Root root, @NotNull org.apache.jackrabbit.oak.namepath.NamePathMapper namePathMapper, @NotNull SecurityProvider securityProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected @NotNull AuthorizationConfiguration
getConfig()
protected @NotNull org.apache.jackrabbit.oak.api.Root
getLatestRoot()
protected @NotNull org.apache.jackrabbit.oak.namepath.NamePathMapper
getNamePathMapper()
protected @Nullable java.lang.String
getOakPath(@Nullable java.lang.String jcrPath)
protected @NotNull java.util.Collection<java.lang.String>
getOakPaths(@Nullable java.lang.String... jcrPaths)
protected @NotNull PermissionProvider
getPermissionProvider()
protected @NotNull PrivilegeBitsProvider
getPrivilegeBitsProvider()
@NotNull org.apache.jackrabbit.api.security.authorization.PrivilegeCollection
getPrivilegeCollection(@Nullable java.lang.String absPath)
@NotNull org.apache.jackrabbit.api.security.authorization.PrivilegeCollection
getPrivilegeCollection(@Nullable java.lang.String absPath, @NotNull java.util.Set<java.security.Principal> principals)
protected @NotNull org.apache.jackrabbit.api.security.authorization.PrivilegeManager
getPrivilegeManager()
@NotNull Privilege[]
getPrivileges(@Nullable java.lang.String absPath)
@NotNull Privilege[]
getPrivileges(@Nullable java.lang.String absPath, @NotNull java.util.Set<java.security.Principal> principals)
protected @NotNull org.apache.jackrabbit.oak.api.Root
getRoot()
@NotNull Privilege[]
getSupportedPrivileges(@Nullable java.lang.String absPath)
protected @NotNull org.apache.jackrabbit.oak.api.Tree
getTree(@Nullable java.lang.String oakPath, long permissions, boolean checkAcContent)
boolean
hasPrivileges(@Nullable java.lang.String absPath, @NotNull java.util.Set<java.security.Principal> principals, @Nullable Privilege[] privileges)
boolean
hasPrivileges(@Nullable java.lang.String absPath, @Nullable Privilege[] privileges)
@NotNull org.apache.jackrabbit.api.security.authorization.PrivilegeCollection
privilegeCollectionFromNames(@NotNull java.lang.String... privilegeNames)
@NotNull Privilege
privilegeFromName(@NotNull java.lang.String privilegeName)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.jcr.security.AccessControlManager
getApplicablePolicies, getEffectivePolicies, getPolicies, removePolicy, setPolicy
-
-
-
-
Constructor Detail
-
AbstractAccessControlManager
protected AbstractAccessControlManager(@NotNull @NotNull org.apache.jackrabbit.oak.api.Root root, @NotNull @NotNull org.apache.jackrabbit.oak.namepath.NamePathMapper namePathMapper, @NotNull @NotNull SecurityProvider securityProvider)
-
-
Method Detail
-
getSupportedPrivileges
@NotNull public @NotNull Privilege[] getSupportedPrivileges(@Nullable @Nullable java.lang.String absPath) throws RepositoryException
- Specified by:
getSupportedPrivileges
in interfaceAccessControlManager
- Throws:
RepositoryException
-
privilegeFromName
@NotNull public @NotNull Privilege privilegeFromName(@NotNull @NotNull java.lang.String privilegeName) throws RepositoryException
- Specified by:
privilegeFromName
in interfaceAccessControlManager
- Throws:
RepositoryException
-
hasPrivileges
public boolean hasPrivileges(@Nullable @Nullable java.lang.String absPath, @Nullable @Nullable Privilege[] privileges) throws RepositoryException
- Specified by:
hasPrivileges
in interfaceAccessControlManager
- Throws:
RepositoryException
-
getPrivileges
@NotNull public @NotNull Privilege[] getPrivileges(@Nullable @Nullable java.lang.String absPath) throws RepositoryException
- Specified by:
getPrivileges
in interfaceAccessControlManager
- Throws:
RepositoryException
-
hasPrivileges
public boolean hasPrivileges(@Nullable @Nullable java.lang.String absPath, @NotNull @NotNull java.util.Set<java.security.Principal> principals, @Nullable @Nullable Privilege[] privileges) throws RepositoryException
- Specified by:
hasPrivileges
in interfaceorg.apache.jackrabbit.api.security.JackrabbitAccessControlManager
- Throws:
RepositoryException
-
getPrivileges
@NotNull public @NotNull Privilege[] getPrivileges(@Nullable @Nullable java.lang.String absPath, @NotNull @NotNull java.util.Set<java.security.Principal> principals) throws RepositoryException
- Specified by:
getPrivileges
in interfaceorg.apache.jackrabbit.api.security.JackrabbitAccessControlManager
- Throws:
RepositoryException
-
getPrivilegeCollection
@NotNull public @NotNull org.apache.jackrabbit.api.security.authorization.PrivilegeCollection getPrivilegeCollection(@Nullable @Nullable java.lang.String absPath) throws RepositoryException
- Specified by:
getPrivilegeCollection
in interfaceorg.apache.jackrabbit.api.security.JackrabbitAccessControlManager
- Throws:
RepositoryException
-
getPrivilegeCollection
@NotNull public @NotNull org.apache.jackrabbit.api.security.authorization.PrivilegeCollection getPrivilegeCollection(@Nullable @Nullable java.lang.String absPath, @NotNull @NotNull java.util.Set<java.security.Principal> principals) throws RepositoryException
- Specified by:
getPrivilegeCollection
in interfaceorg.apache.jackrabbit.api.security.JackrabbitAccessControlManager
- Throws:
RepositoryException
-
privilegeCollectionFromNames
@NotNull public @NotNull org.apache.jackrabbit.api.security.authorization.PrivilegeCollection privilegeCollectionFromNames(@NotNull @NotNull java.lang.String... privilegeNames) throws RepositoryException
- Specified by:
privilegeCollectionFromNames
in interfaceorg.apache.jackrabbit.api.security.JackrabbitAccessControlManager
- Throws:
RepositoryException
-
getConfig
@NotNull protected @NotNull AuthorizationConfiguration getConfig()
-
getRoot
@NotNull protected @NotNull org.apache.jackrabbit.oak.api.Root getRoot()
-
getLatestRoot
@NotNull protected @NotNull org.apache.jackrabbit.oak.api.Root getLatestRoot()
-
getNamePathMapper
@NotNull protected @NotNull org.apache.jackrabbit.oak.namepath.NamePathMapper getNamePathMapper()
-
getPrivilegeManager
@NotNull protected @NotNull org.apache.jackrabbit.api.security.authorization.PrivilegeManager getPrivilegeManager()
-
getPrivilegeBitsProvider
@NotNull protected @NotNull PrivilegeBitsProvider getPrivilegeBitsProvider()
-
getOakPath
@Nullable protected @Nullable java.lang.String getOakPath(@Nullable @Nullable java.lang.String jcrPath) throws RepositoryException
- Throws:
RepositoryException
-
getOakPaths
@NotNull protected @NotNull java.util.Collection<java.lang.String> getOakPaths(@Nullable @Nullable java.lang.String... jcrPaths) throws RepositoryException
- Throws:
RepositoryException
-
getTree
@NotNull protected @NotNull org.apache.jackrabbit.oak.api.Tree getTree(@Nullable @Nullable java.lang.String oakPath, long permissions, boolean checkAcContent) throws RepositoryException
- Throws:
RepositoryException
-
getPermissionProvider
@NotNull protected @NotNull PermissionProvider getPermissionProvider()
-
-