Class PermissionHook
- java.lang.Object
-
- org.apache.jackrabbit.oak.security.authorization.permission.PermissionHook
-
- All Implemented Interfaces:
CommitHook
,PostValidationHook
,AccessControlConstants
,PermissionConstants
public class PermissionHook extends Object implements PostValidationHook, AccessControlConstants, PermissionConstants
CommitHook
implementation that processes any modification made to access control content and updates persisted permission store associated with access control related data stored in the repository.The permission entries are grouped by principal and stored below the store root based on the hash value of the access controllable path. hash collisions are handled by adding subnodes accordingly.
/jcr:system/rep:permissionStore/workspace-name /everyone /552423 [rep:PermissionStore] /0 [rep:Permissions] /1 [rep:Permissions] /c0 [rep:PermissionStore] /0 [rep:Permissions] /1 [rep:Permissions] /2 [rep:Permissions] /c1 [rep:PermissionStore] /0 [rep:Permissions] /1 [rep:Permissions] /2 [rep:Permissions]
-
-
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
-
Fields inherited from interface org.apache.jackrabbit.oak.spi.security.authorization.permission.PermissionConstants
DEFAULT_READ_PATHS, NT_REP_PERMISSION_STORE, NT_REP_PERMISSIONS, PARAM_ADMINISTRATIVE_PRINCIPALS, PARAM_PERMISSIONS_JR2, PARAM_READ_PATHS, PERMISSION_NODE_NAMES, PERMISSION_NODETYPE_NAMES, PERMISSION_PROPERTY_NAMES, PERMISSIONS_STORE_PATH, REP_ACCESS_CONTROLLED_PATH, REP_IS_ALLOW, REP_NUM_PERMISSIONS, REP_PERMISSION_STORE, REP_PRIVILEGE_BITS, VALUE_PERMISSIONS_JR2
-
-
Constructor Summary
Constructors Constructor Description PermissionHook(@NotNull String workspaceName, @NotNull RestrictionProvider restrictionProvider, @NotNull ProviderCtx providerCtx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull NodeState
processCommit(NodeState before, NodeState after, CommitInfo info)
Validates and/or modifies the given content change before it gets persisted.String
toString()
-
-
-
Constructor Detail
-
PermissionHook
public PermissionHook(@NotNull @NotNull String workspaceName, @NotNull @NotNull RestrictionProvider restrictionProvider, @NotNull @NotNull ProviderCtx providerCtx)
-
-
Method Detail
-
processCommit
@NotNull public @NotNull NodeState processCommit(NodeState before, NodeState after, CommitInfo info)
Description copied from interface:CommitHook
Validates and/or modifies the given content change before it gets persisted.- Specified by:
processCommit
in interfaceCommitHook
- Parameters:
before
- content tree before the commitafter
- content tree prepared for the commitinfo
- metadata associated with this commit- Returns:
- content tree to be committed
-
-