test_class.declarator: mountInfoProvider
test_class.modifier: private
test_class.original_string: private MountInfoProvider mountInfoProvider;
test_class.type: MountInfoProvider
test_class.var_name: mountInfoProvider
test_class.declarator: testNode = "MultiplexingProviderTest"
test_class.modifier: private
test_class.original_string: private String testNode = "MultiplexingProviderTest";
test_class.type: String
test_class.var_name: testNode
test_class.declarator: testPath = "/" + testNode
test_class.modifier: private
test_class.original_string: private String testPath = "/" + testNode;
test_class.type: String
test_class.var_name: testPath
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/permission/MountPermissionProviderTest.java
test_class.identifier: MountPermissionProviderTest
test_class.interfaces: implements AccessControlConstants, PrivilegeConstants, PermissionConstants
test_class.superclass: extends AbstractSecurityTest
test_case.body: @Test
      public void multiplexingProvider() throws Exception {
  
          // check init
          Tree permStore = root.getTree(PERMISSIONS_STORE_PATH);
          String wsName = adminSession.getWorkspaceName();
          assertTrue(permStore.hasChild(wsName));
          for (Mount m : mountInfoProvider.getNonDefaultMounts()) {
              assertTrue(permStore.hasChild(MountPermissionProvider.getPermissionRootName(m, wsName)));
          }
  
          Tree rootNode = root.getTree("/");
          Tree test = TreeUtil.addChild(rootNode, testNode, JcrConstants.NT_UNSTRUCTURED);
          Tree content = TreeUtil.addChild(test, "content", JcrConstants.NT_UNSTRUCTURED);
          root.commit();
  
          Principal p = getTestUser().getPrincipal();
          setPrivileges(p, test.getPath(), true, JCR_READ);
          setPrivileges(p, content.getPath(), false, JCR_READ);
  
          permStore = root.getTree(PERMISSIONS_STORE_PATH);
          // no entries in the default store
          assertFalse(permStore.getChild(wsName).hasChild(p.getName()));
          for (Mount m : mountInfoProvider.getNonDefaultMounts()) {
              Tree mps = permStore.getChild(MountPermissionProvider.getPermissionRootName(m, wsName));
              assertTrue(mps.hasChild(p.getName()));
          }
  
          try (ContentSession testSession = createTestSession()) {
              Root r = testSession.getLatestRoot();
              assertFalse(r.getTree("/").exists());
              assertTrue(r.getTree(test.getPath()).exists());
              assertFalse(r.getTree(content.getPath()).exists());
          }
      }
test_case.class_method_signature: MountPermissionProviderTest.multiplexingProvider()
test_case.full_signature: @Test public void multiplexingProvider()
test_case.identifier: multiplexingProvider
test_case.invocations: getTree getWorkspaceName assertTrue hasChild getNonDefaultMounts assertTrue hasChild getPermissionRootName getTree addChild addChild commit getPrincipal getTestUser setPrivileges getPath setPrivileges getPath getTree assertFalse hasChild getChild getName getNonDefaultMounts getChild getPermissionRootName assertTrue hasChild getName createTestSession getLatestRoot assertFalse exists getTree assertTrue exists getTree getPath assertFalse exists getTree getPath
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void multiplexingProvider()
focal_class.declarator: mountInfoProvider
focal_class.modifier: private final
focal_class.original_string: private final MountInfoProvider mountInfoProvider;
focal_class.type: MountInfoProvider
focal_class.var_name: mountInfoProvider
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/MountPermissionProvider.java
focal_class.identifier: MountPermissionProvider
focal_class.class_method_signature: MountPermissionProvider.getPermissionRootName(@NotNull Mount mount, @NotNull String workspace)
focal_class.full_signature: @NotNull public static String getPermissionRootName(@NotNull Mount mount, @NotNull String workspace)
focal_class.identifier: getPermissionRootName
focal_class.modifiers: @NotNull public static
focal_class.parameters: (@NotNull Mount mount, @NotNull String workspace)
focal_class.return: String
focal_class.signature: String getPermissionRootName(@NotNull Mount mount, @NotNull String workspace)
focal_class.class_method_signature: MountPermissionProvider.MountPermissionProvider(@NotNull Root root, @NotNull String workspaceName,
                                     @NotNull Set<Principal> principals, @NotNull RestrictionProvider restrictionProvider,
                                     @NotNull ConfigurationParameters options, @NotNull Context ctx,
                                     @NotNull ProviderCtx providerCtx)
focal_class.full_signature: public  MountPermissionProvider(@NotNull Root root, @NotNull String workspaceName,
                                     @NotNull Set<Principal> principals, @NotNull RestrictionProvider restrictionProvider,
                                     @NotNull ConfigurationParameters options, @NotNull Context ctx,
                                     @NotNull ProviderCtx providerCtx)
focal_class.identifier: MountPermissionProvider
focal_class.modifiers: public
focal_class.parameters: (@NotNull Root root, @NotNull String workspaceName,
                                     @NotNull Set<Principal> principals, @NotNull RestrictionProvider restrictionProvider,
                                     @NotNull ConfigurationParameters options, @NotNull Context ctx,
                                     @NotNull ProviderCtx providerCtx)
focal_class.signature:  MountPermissionProvider(@NotNull Root root, @NotNull String workspaceName,
                                     @NotNull Set<Principal> principals, @NotNull RestrictionProvider restrictionProvider,
                                     @NotNull ConfigurationParameters options, @NotNull Context ctx,
                                     @NotNull ProviderCtx providerCtx)
focal_class.class_method_signature: MountPermissionProvider.getPermissionStore(@NotNull Root root, @NotNull String workspaceName, @NotNull RestrictionProvider restrictionProvider)
focal_class.full_signature: @NotNull @Override protected PermissionStore getPermissionStore(@NotNull Root root, @NotNull String workspaceName, @NotNull RestrictionProvider restrictionProvider)
focal_class.identifier: getPermissionStore
focal_class.modifiers: @NotNull @Override protected
focal_class.parameters: (@NotNull Root root, @NotNull String workspaceName, @NotNull RestrictionProvider restrictionProvider)
focal_class.return: PermissionStore
focal_class.signature: PermissionStore getPermissionStore(@NotNull Root root, @NotNull String workspaceName, @NotNull RestrictionProvider restrictionProvider)
focal_class.superclass: extends PermissionProviderImpl
focal_method.body: @NotNull
      public static String getPermissionRootName(@NotNull Mount mount, @NotNull String workspace) {
          if (mount.isDefault()) {
              return workspace;
          } else {
              return mount.getPathFragmentName() + "-" + workspace;
          }
      }
focal_method.class_method_signature: MountPermissionProvider.getPermissionRootName(@NotNull Mount mount, @NotNull String workspace)
focal_method.full_signature: @NotNull public static String getPermissionRootName(@NotNull Mount mount, @NotNull String workspace)
focal_method.identifier: getPermissionRootName
focal_method.invocations: isDefault getPathFragmentName
focal_method.modifiers: @NotNull public static
focal_method.parameters: (@NotNull Mount mount, @NotNull String workspace)
focal_method.return: String
focal_method.signature: String getPermissionRootName(@NotNull Mount mount, @NotNull String workspace)