test_class.declarator: PATH_INCUG_MAP = new HashMap<>()
test_class.modifier: private static final
test_class.original_string: private static final Map<String, Boolean> PATH_INCUG_MAP = new HashMap<>();
test_class.type: Map<String, Boolean>
test_class.var_name: PATH_INCUG_MAP
test_class.declarator: READABLE_PATHS = ImmutableList.of(
              "/content/a/b/c", "/content/a/b/c/jcr:primaryType",
              "/content/a/b/c/nonExisting", "/content/a/b/c/nonExisting/jcr:primaryType")
test_class.modifier: private static final
test_class.original_string: private static final List<String> READABLE_PATHS = ImmutableList.of(
              "/content/a/b/c", "/content/a/b/c/jcr:primaryType",
              "/content/a/b/c/nonExisting", "/content/a/b/c/nonExisting/jcr:primaryType");
test_class.type: List<String>
test_class.var_name: READABLE_PATHS
test_class.declarator: NOT_READABLE_PATHS = ImmutableList.of(
              "/", "/jcr:primaryType",
              UNSUPPORTED_PATH, UNSUPPORTED_PATH + "/jcr:primaryType",
              "/content", "/content/jcr:primaryType",
              "/content/a", "/content/a/jcr:primaryType",
              "/content/a/b", "/content/a/b/jcr:primaryType",
              "/content/a/b/c/rep:cugPolicy", "/content/a/b/c/rep:cugPolicy/jcr:primaryType", "/content/a/b/c/rep:cugPolicy/rep:principalNames",
              "/content/a/b/c/rep:cugPolicy/nonExisting", "/content/a/b/c/rep:cugPolicy/nonExisting/jcr:primaryType",
              "/content/aa", "/content/aa/jcr:primaryType",
              "/content/bb", "/content/bb/jcr:primaryType",
              "/content/aa/bb/rep:cugPolicy", "/content/aa/bb/rep:cugPolicy/jcr:primaryType", "/content/aa/bb/rep:cugPolicy/rep:principalNames",
              "/content/nonExisting", "/content/nonExisting/jcr:primaryType",
              "/content/no","/content/no/cug","/content/no/cug/in","/content/no/cug/in/subtree")
test_class.modifier: private static final
test_class.original_string: private static final List<String> NOT_READABLE_PATHS = ImmutableList.of(
              "/", "/jcr:primaryType",
              UNSUPPORTED_PATH, UNSUPPORTED_PATH + "/jcr:primaryType",
              "/content", "/content/jcr:primaryType",
              "/content/a", "/content/a/jcr:primaryType",
              "/content/a/b", "/content/a/b/jcr:primaryType",
              "/content/a/b/c/rep:cugPolicy", "/content/a/b/c/rep:cugPolicy/jcr:primaryType", "/content/a/b/c/rep:cugPolicy/rep:principalNames",
              "/content/a/b/c/rep:cugPolicy/nonExisting", "/content/a/b/c/rep:cugPolicy/nonExisting/jcr:primaryType",
              "/content/aa", "/content/aa/jcr:primaryType",
              "/content/bb", "/content/bb/jcr:primaryType",
              "/content/aa/bb/rep:cugPolicy", "/content/aa/bb/rep:cugPolicy/jcr:primaryType", "/content/aa/bb/rep:cugPolicy/rep:principalNames",
              "/content/nonExisting", "/content/nonExisting/jcr:primaryType",
              "/content/no","/content/no/cug","/content/no/cug/in","/content/no/cug/in/subtree");
test_class.type: List<String>
test_class.var_name: NOT_READABLE_PATHS
test_class.declarator: testGroupPrincipal
test_class.modifier: private
test_class.original_string: private Principal testGroupPrincipal;
test_class.type: Principal
test_class.var_name: testGroupPrincipal
test_class.declarator: cugPermProvider
test_class.modifier: private
test_class.original_string: private CugPermissionProvider cugPermProvider;
test_class.type: CugPermissionProvider
test_class.var_name: cugPermProvider
test_class.file: oak-authorization-cug/src/test/java/org/apache/jackrabbit/oak/spi/security/authorization/cug/impl/CugPermissionProviderTest.java
test_class.identifier: CugPermissionProviderTest
test_class.interfaces: implements NodeTypeConstants
test_class.superclass: extends AbstractCugTest
test_case.body: @Test
      public void testIsGrantedRead() {
          for (String p : NOT_READABLE_PATHS) {
              Tree tree = root.getTree(p);
              if (tree.exists()) {
                  assertFalse(cugPermProvider.isGranted(tree, null, Permissions.READ));
                  assertFalse(cugPermProvider.isGranted(tree, tree.getProperty(JCR_PRIMARYTYPE), Permissions.READ_PROPERTY));
              }
          }
  
          for (String p : READABLE_PATHS) {
              Tree tree = root.getTree(p);
              if (tree.exists()) {
                  assertTrue(cugPermProvider.isGranted(tree, null, Permissions.READ));
                  assertTrue(cugPermProvider.isGranted(tree, null, Permissions.READ_NODE));
                  assertTrue(cugPermProvider.isGranted(tree, tree.getProperty(JCR_PRIMARYTYPE), Permissions.READ_PROPERTY));
              }
          }
      }
test_case.class_method_signature: CugPermissionProviderTest.testIsGrantedRead()
test_case.full_signature: @Test public void testIsGrantedRead()
test_case.identifier: testIsGrantedRead
test_case.invocations: getTree exists assertFalse isGranted assertFalse isGranted getProperty getTree exists assertTrue isGranted assertTrue isGranted assertTrue isGranted getProperty
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIsGrantedRead()
focal_class.declarator: READ_PRIVILEGE_NAMES = ImmutableSet.of(
              PrivilegeConstants.JCR_READ,
              PrivilegeConstants.REP_READ_NODES,
              PrivilegeConstants.REP_READ_PROPERTIES
      )
focal_class.modifier: private static final
focal_class.original_string: private static final Set<String> READ_PRIVILEGE_NAMES = ImmutableSet.of(
              PrivilegeConstants.JCR_READ,
              PrivilegeConstants.REP_READ_NODES,
              PrivilegeConstants.REP_READ_PROPERTIES
      );
focal_class.type: Set<String>
focal_class.var_name: READ_PRIVILEGE_NAMES
focal_class.declarator: root
focal_class.modifier: private final
focal_class.original_string: private final Root root;
focal_class.type: Root
focal_class.var_name: root
focal_class.declarator: workspaceName
focal_class.modifier: private final
focal_class.original_string: private final String workspaceName;
focal_class.type: String
focal_class.var_name: workspaceName
focal_class.declarator: principalNames
focal_class.modifier: private final
focal_class.original_string: private final String[] principalNames;
focal_class.type: String[]
focal_class.var_name: principalNames
focal_class.declarator: typeProvider
focal_class.modifier: private final
focal_class.original_string: private final TreeTypeProvider typeProvider;
focal_class.type: TreeTypeProvider
focal_class.var_name: typeProvider
focal_class.declarator: ctx
focal_class.modifier: private final
focal_class.original_string: private final Context ctx;
focal_class.type: Context
focal_class.var_name: ctx
focal_class.declarator: supportedPaths
focal_class.modifier: private final
focal_class.original_string: private final SupportedPaths supportedPaths;
focal_class.type: SupportedPaths
focal_class.var_name: supportedPaths
focal_class.declarator: immutableRoot
focal_class.modifier: private
focal_class.original_string: private Root immutableRoot;
focal_class.type: Root
focal_class.var_name: immutableRoot
focal_class.declarator: versionManager
focal_class.modifier: private
focal_class.original_string: private ReadOnlyVersionManager versionManager;
focal_class.type: ReadOnlyVersionManager
focal_class.var_name: versionManager
focal_class.declarator: topPaths
focal_class.modifier: private
focal_class.original_string: private TopLevelPaths topPaths;
focal_class.type: TopLevelPaths
focal_class.var_name: topPaths
focal_class.declarator: rootProvider
focal_class.modifier: private final
focal_class.original_string: private final RootProvider rootProvider;
focal_class.type: RootProvider
focal_class.var_name: rootProvider
focal_class.declarator: treeProvider
focal_class.modifier: private final
focal_class.original_string: private final TreeProvider treeProvider;
focal_class.type: TreeProvider
focal_class.var_name: treeProvider
focal_class.file: oak-authorization-cug/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/cug/impl/CugPermissionProvider.java
focal_class.identifier: CugPermissionProvider
focal_class.interfaces: implements AggregatedPermissionProvider, CugConstants
focal_class.class_method_signature: CugPermissionProvider.CugPermissionProvider(@NotNull Root root,
                            @NotNull String workspaceName,
                            @NotNull Set<Principal> principals,
                            @NotNull Set<String> supportedPaths,
                            @NotNull Context ctx,
                            @NotNull RootProvider rootProvider,
                            @NotNull TreeProvider treeProvider)
focal_class.full_signature:   CugPermissionProvider(@NotNull Root root,
                            @NotNull String workspaceName,
                            @NotNull Set<Principal> principals,
                            @NotNull Set<String> supportedPaths,
                            @NotNull Context ctx,
                            @NotNull RootProvider rootProvider,
                            @NotNull TreeProvider treeProvider)
focal_class.identifier: CugPermissionProvider
focal_class.parameters: (@NotNull Root root,
                            @NotNull String workspaceName,
                            @NotNull Set<Principal> principals,
                            @NotNull Set<String> supportedPaths,
                            @NotNull Context ctx,
                            @NotNull RootProvider rootProvider,
                            @NotNull TreeProvider treeProvider)
focal_class.signature:  CugPermissionProvider(@NotNull Root root,
                            @NotNull String workspaceName,
                            @NotNull Set<Principal> principals,
                            @NotNull Set<String> supportedPaths,
                            @NotNull Context ctx,
                            @NotNull RootProvider rootProvider,
                            @NotNull TreeProvider treeProvider)
focal_class.class_method_signature: CugPermissionProvider.getTreePermission(@NotNull Tree parent, @NotNull TreeType parentType, @NotNull String childName, @NotNull NodeState childState, @NotNull AbstractTreePermission parentPermission)
focal_class.full_signature: @NotNull TreePermission getTreePermission(@NotNull Tree parent, @NotNull TreeType parentType, @NotNull String childName, @NotNull NodeState childState, @NotNull AbstractTreePermission parentPermission)
focal_class.identifier: getTreePermission
focal_class.modifiers: @NotNull
focal_class.parameters: (@NotNull Tree parent, @NotNull TreeType parentType, @NotNull String childName, @NotNull NodeState childState, @NotNull AbstractTreePermission parentPermission)
focal_class.return: TreePermission
focal_class.signature: TreePermission getTreePermission(@NotNull Tree parent, @NotNull TreeType parentType, @NotNull String childName, @NotNull NodeState childState, @NotNull AbstractTreePermission parentPermission)
focal_class.class_method_signature: CugPermissionProvider.isAllow(@NotNull Tree cugTree)
focal_class.full_signature:  boolean isAllow(@NotNull Tree cugTree)
focal_class.identifier: isAllow
focal_class.parameters: (@NotNull Tree cugTree)
focal_class.return: boolean
focal_class.signature: boolean isAllow(@NotNull Tree cugTree)
focal_class.class_method_signature: CugPermissionProvider.refresh()
focal_class.full_signature: @Override public void refresh()
focal_class.identifier: refresh
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void refresh()
focal_class.class_method_signature: CugPermissionProvider.getPrivileges(@Nullable Tree tree)
focal_class.full_signature: @NotNull @Override public Set<String> getPrivileges(@Nullable Tree tree)
focal_class.identifier: getPrivileges
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@Nullable Tree tree)
focal_class.return: Set<String>
focal_class.signature: Set<String> getPrivileges(@Nullable Tree tree)
focal_class.class_method_signature: CugPermissionProvider.hasPrivileges(@Nullable Tree tree, @NotNull String... privilegeNames)
focal_class.full_signature: @Override public boolean hasPrivileges(@Nullable Tree tree, @NotNull String... privilegeNames)
focal_class.identifier: hasPrivileges
focal_class.modifiers: @Override public
focal_class.parameters: (@Nullable Tree tree, @NotNull String... privilegeNames)
focal_class.return: boolean
focal_class.signature: boolean hasPrivileges(@Nullable Tree tree, @NotNull String... privilegeNames)
focal_class.class_method_signature: CugPermissionProvider.getRepositoryPermission()
focal_class.full_signature: @NotNull @Override public RepositoryPermission getRepositoryPermission()
focal_class.identifier: getRepositoryPermission
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: RepositoryPermission
focal_class.signature: RepositoryPermission getRepositoryPermission()
focal_class.class_method_signature: CugPermissionProvider.getTreePermission(@NotNull Tree tree, @NotNull TreePermission parentPermission)
focal_class.full_signature: @NotNull @Override public TreePermission getTreePermission(@NotNull Tree tree, @NotNull TreePermission parentPermission)
focal_class.identifier: getTreePermission
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@NotNull Tree tree, @NotNull TreePermission parentPermission)
focal_class.return: TreePermission
focal_class.signature: TreePermission getTreePermission(@NotNull Tree tree, @NotNull TreePermission parentPermission)
focal_class.class_method_signature: CugPermissionProvider.isGranted(@NotNull Tree tree, PropertyState property, long permissions)
focal_class.full_signature: @Override public boolean isGranted(@NotNull Tree tree, PropertyState property, long permissions)
focal_class.identifier: isGranted
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Tree tree, PropertyState property, long permissions)
focal_class.return: boolean
focal_class.signature: boolean isGranted(@NotNull Tree tree, PropertyState property, long permissions)
focal_class.class_method_signature: CugPermissionProvider.isGranted(@NotNull String oakPath, @NotNull String jcrActions)
focal_class.full_signature: @Override public boolean isGranted(@NotNull String oakPath, @NotNull String jcrActions)
focal_class.identifier: isGranted
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull String oakPath, @NotNull String jcrActions)
focal_class.return: boolean
focal_class.signature: boolean isGranted(@NotNull String oakPath, @NotNull String jcrActions)
focal_class.class_method_signature: CugPermissionProvider.supportedPrivileges(@Nullable Tree tree, @Nullable PrivilegeBits privilegeBits)
focal_class.full_signature: @NotNull @Override public PrivilegeBits supportedPrivileges(@Nullable Tree tree, @Nullable PrivilegeBits privilegeBits)
focal_class.identifier: supportedPrivileges
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@Nullable Tree tree, @Nullable PrivilegeBits privilegeBits)
focal_class.return: PrivilegeBits
focal_class.signature: PrivilegeBits supportedPrivileges(@Nullable Tree tree, @Nullable PrivilegeBits privilegeBits)
focal_class.class_method_signature: CugPermissionProvider.supportedPermissions(@Nullable Tree tree, @Nullable PropertyState property, long permissions)
focal_class.full_signature: @Override public long supportedPermissions(@Nullable Tree tree, @Nullable PropertyState property, long permissions)
focal_class.identifier: supportedPermissions
focal_class.modifiers: @Override public
focal_class.parameters: (@Nullable Tree tree, @Nullable PropertyState property, long permissions)
focal_class.return: long
focal_class.signature: long supportedPermissions(@Nullable Tree tree, @Nullable PropertyState property, long permissions)
focal_class.class_method_signature: CugPermissionProvider.supportedPermissions(@NotNull TreeLocation location, long permissions)
focal_class.full_signature: @Override public long supportedPermissions(@NotNull TreeLocation location, long permissions)
focal_class.identifier: supportedPermissions
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull TreeLocation location, long permissions)
focal_class.return: long
focal_class.signature: long supportedPermissions(@NotNull TreeLocation location, long permissions)
focal_class.class_method_signature: CugPermissionProvider.supportedPermissions(@NotNull TreePermission treePermission, @Nullable PropertyState property, long permissions)
focal_class.full_signature: @Override public long supportedPermissions(@NotNull TreePermission treePermission, @Nullable PropertyState property, long permissions)
focal_class.identifier: supportedPermissions
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull TreePermission treePermission, @Nullable PropertyState property, long permissions)
focal_class.return: long
focal_class.signature: long supportedPermissions(@NotNull TreePermission treePermission, @Nullable PropertyState property, long permissions)
focal_class.class_method_signature: CugPermissionProvider.isGranted(@NotNull TreeLocation location, long permissions)
focal_class.full_signature: @Override public boolean isGranted(@NotNull TreeLocation location, long permissions)
focal_class.identifier: isGranted
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull TreeLocation location, long permissions)
focal_class.return: boolean
focal_class.signature: boolean isGranted(@NotNull TreeLocation location, long permissions)
focal_class.class_method_signature: CugPermissionProvider.getTreePermission(@NotNull Tree immutableTree, @NotNull TreeType type, @NotNull TreePermission parentPermission)
focal_class.full_signature: @NotNull public TreePermission getTreePermission(@NotNull Tree immutableTree, @NotNull TreeType type, @NotNull TreePermission parentPermission)
focal_class.identifier: getTreePermission
focal_class.modifiers: @NotNull public
focal_class.parameters: (@NotNull Tree immutableTree, @NotNull TreeType type, @NotNull TreePermission parentPermission)
focal_class.return: TreePermission
focal_class.signature: TreePermission getTreePermission(@NotNull Tree immutableTree, @NotNull TreeType type, @NotNull TreePermission parentPermission)
focal_class.class_method_signature: CugPermissionProvider.isJcrSystemPath(@NotNull Tree tree)
focal_class.full_signature: private static boolean isJcrSystemPath(@NotNull Tree tree)
focal_class.identifier: isJcrSystemPath
focal_class.modifiers: private static
focal_class.parameters: (@NotNull Tree tree)
focal_class.return: boolean
focal_class.signature: boolean isJcrSystemPath(@NotNull Tree tree)
focal_class.class_method_signature: CugPermissionProvider.isRead(long permission)
focal_class.full_signature: private static boolean isRead(long permission)
focal_class.identifier: isRead
focal_class.modifiers: private static
focal_class.parameters: (long permission)
focal_class.return: boolean
focal_class.signature: boolean isRead(long permission)
focal_class.class_method_signature: CugPermissionProvider.isSupportedType(@NotNull TreeType type)
focal_class.full_signature: private static boolean isSupportedType(@NotNull TreeType type)
focal_class.identifier: isSupportedType
focal_class.modifiers: private static
focal_class.parameters: (@NotNull TreeType type)
focal_class.return: boolean
focal_class.signature: boolean isSupportedType(@NotNull TreeType type)
focal_class.class_method_signature: CugPermissionProvider.includesCug(@Nullable Tree tree)
focal_class.full_signature: private boolean includesCug(@Nullable Tree tree)
focal_class.identifier: includesCug
focal_class.modifiers: private
focal_class.parameters: (@Nullable Tree tree)
focal_class.return: boolean
focal_class.signature: boolean includesCug(@Nullable Tree tree)
focal_class.class_method_signature: CugPermissionProvider.includes(@NotNull String path)
focal_class.full_signature: private boolean includes(@NotNull String path)
focal_class.identifier: includes
focal_class.modifiers: private
focal_class.parameters: (@NotNull String path)
focal_class.return: boolean
focal_class.signature: boolean includes(@NotNull String path)
focal_class.class_method_signature: CugPermissionProvider.mayContain(@NotNull String path)
focal_class.full_signature: private boolean mayContain(@NotNull String path)
focal_class.identifier: mayContain
focal_class.modifiers: private
focal_class.parameters: (@NotNull String path)
focal_class.return: boolean
focal_class.signature: boolean mayContain(@NotNull String path)
focal_class.class_method_signature: CugPermissionProvider.getCugRoot(@NotNull Tree immutableTree, @NotNull TreeType type)
focal_class.full_signature: @Nullable private Tree getCugRoot(@NotNull Tree immutableTree, @NotNull TreeType type)
focal_class.identifier: getCugRoot
focal_class.modifiers: @Nullable private
focal_class.parameters: (@NotNull Tree immutableTree, @NotNull TreeType type)
focal_class.return: Tree
focal_class.signature: Tree getCugRoot(@NotNull Tree immutableTree, @NotNull TreeType type)
focal_class.class_method_signature: CugPermissionProvider.canRead(@NotNull Tree tree)
focal_class.full_signature: private boolean canRead(@NotNull Tree tree)
focal_class.identifier: canRead
focal_class.modifiers: private
focal_class.parameters: (@NotNull Tree tree)
focal_class.return: boolean
focal_class.signature: boolean canRead(@NotNull Tree tree)
focal_class.class_method_signature: CugPermissionProvider.getImmutableTree(@NotNull Tree tree)
focal_class.full_signature: @NotNull private Tree getImmutableTree(@NotNull Tree tree)
focal_class.identifier: getImmutableTree
focal_class.modifiers: @NotNull private
focal_class.parameters: (@NotNull Tree tree)
focal_class.return: Tree
focal_class.signature: Tree getImmutableTree(@NotNull Tree tree)
focal_class.class_method_signature: CugPermissionProvider.getTreeFromLocation(@NotNull TreeLocation location)
focal_class.full_signature: @Nullable private static Tree getTreeFromLocation(@NotNull TreeLocation location)
focal_class.identifier: getTreeFromLocation
focal_class.modifiers: @Nullable private static
focal_class.parameters: (@NotNull TreeLocation location)
focal_class.return: Tree
focal_class.signature: Tree getTreeFromLocation(@NotNull TreeLocation location)
focal_class.class_method_signature: CugPermissionProvider.createVersionPermission(@NotNull Tree tree, @NotNull TreeType type, @NotNull TreePermission parent, boolean parentIsCugPermission)
focal_class.full_signature: @NotNull private TreePermission createVersionPermission(@NotNull Tree tree, @NotNull TreeType type, @NotNull TreePermission parent, boolean parentIsCugPermission)
focal_class.identifier: createVersionPermission
focal_class.modifiers: @NotNull private
focal_class.parameters: (@NotNull Tree tree, @NotNull TreeType type, @NotNull TreePermission parent, boolean parentIsCugPermission)
focal_class.return: TreePermission
focal_class.signature: TreePermission createVersionPermission(@NotNull Tree tree, @NotNull TreeType type, @NotNull TreePermission parent, boolean parentIsCugPermission)
focal_class.class_method_signature: CugPermissionProvider.getVersionManager()
focal_class.full_signature: @NotNull private ReadOnlyVersionManager getVersionManager()
focal_class.identifier: getVersionManager
focal_class.modifiers: @NotNull private
focal_class.parameters: ()
focal_class.return: ReadOnlyVersionManager
focal_class.signature: ReadOnlyVersionManager getVersionManager()
focal_method.body: @Override
      public boolean isGranted(@NotNull Tree tree, PropertyState property, long permissions) {
          if (isRead(permissions)) {
              return canRead(tree);
          } else {
              return false;
          }
      }
focal_method.class_method_signature: CugPermissionProvider.isGranted(@NotNull Tree tree, PropertyState property, long permissions)
focal_method.full_signature: @Override public boolean isGranted(@NotNull Tree tree, PropertyState property, long permissions)
focal_method.identifier: isGranted
focal_method.invocations: isRead canRead
focal_method.modifiers: @Override public
focal_method.parameters: (@NotNull Tree tree, PropertyState property, long permissions)
focal_method.return: boolean
focal_method.signature: boolean isGranted(@NotNull Tree tree, PropertyState property, long permissions)