Class RestrictionProviderImpl

  • All Implemented Interfaces:
    org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.AccessControlConstants, org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider

    public class RestrictionProviderImpl
    extends org.apache.jackrabbit.oak.spi.security.authorization.restriction.AbstractRestrictionProvider
    Default restriction provider implementation that supports the following restrictions:
    • AccessControlConstants.REP_GLOB: A simple paths matching pattern. See GlobPattern for details.
    • AccessControlConstants.REP_NT_NAMES: A restriction that allows to limit the effect of a given access control entries to JCR nodes of any of the specified primary node type. In case of a JCR property the primary type of the parent node is taken into consideration when evaluating the permissions.
    • AccessControlConstants.REP_PREFIXES: A multivalued access control restriction which matches by name space prefix. The corresponding restriction type is Type.STRINGS.
    • 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_ITEM_NAMES, REP_NODE_PATH, REP_NT_NAMES, REP_POLICY, REP_PREFIXES, REP_PRINCIPAL_NAME, REP_PRIVILEGES, REP_REPO_POLICY, REP_RESTRICTIONS
      • Fields inherited from interface org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider

        EMPTY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern getPattern​(@Nullable java.lang.String oakPath, @NotNull java.util.Set<org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction> restrictions)  
      @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern getPattern​(@Nullable java.lang.String oakPath, @NotNull org.apache.jackrabbit.oak.api.Tree tree)  
      void validateRestrictions​(@Nullable java.lang.String oakPath, @NotNull org.apache.jackrabbit.oak.api.Tree aceTree)  
      • Methods inherited from class org.apache.jackrabbit.oak.spi.security.authorization.restriction.AbstractRestrictionProvider

        createRestriction, createRestriction, getRestrictionsTree, getSupportedRestrictions, isUnsupportedPath, readRestrictions, writeRestrictions
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RestrictionProviderImpl

        public RestrictionProviderImpl()
    • Method Detail

      • getPattern

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern getPattern​(@Nullable
                                                                                                                       @Nullable java.lang.String oakPath,
                                                                                                                       @NotNull
                                                                                                                       @NotNull org.apache.jackrabbit.oak.api.Tree tree)
      • getPattern

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern getPattern​(@Nullable
                                                                                                                       @Nullable java.lang.String oakPath,
                                                                                                                       @NotNull
                                                                                                                       @NotNull java.util.Set<org.apache.jackrabbit.oak.spi.security.authorization.restriction.Restriction> restrictions)
      • validateRestrictions

        public void validateRestrictions​(@Nullable
                                         @Nullable java.lang.String oakPath,
                                         @NotNull
                                         @NotNull org.apache.jackrabbit.oak.api.Tree aceTree)
                                  throws AccessControlException
        Specified by:
        validateRestrictions in interface org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider
        Overrides:
        validateRestrictions in class org.apache.jackrabbit.oak.spi.security.authorization.restriction.AbstractRestrictionProvider
        Throws:
        AccessControlException