AbstractAccessControlManager implements JackrabbitAccessControlManager, AccessControlConstants { @NotNull @Override public Privilege[] getSupportedPrivileges(@Nullable String absPath) throws RepositoryException { getTree(getOakPath(absPath), Permissions.NO_PERMISSION, false); return privilegeManager.getRegisteredPrivileges(); } protected  AbstractAccessControlManager(@NotNull Root root,
                                           @NotNull NamePathMapper namePathMapper,
                                           @NotNull SecurityProvider securityProvider); @NotNull @Override Privilege[] getSupportedPrivileges(@Nullable String absPath); @NotNull @Override Privilege privilegeFromName(@NotNull String privilegeName); @Override boolean hasPrivileges(@Nullable String absPath, @Nullable Privilege[] privileges); @NotNull @Override Privilege[] getPrivileges(@Nullable String absPath); @Override boolean hasPrivileges(@Nullable String absPath, @NotNull Set<Principal> principals, @Nullable Privilege[] privileges); @NotNull @Override Privilege[] getPrivileges(@Nullable String absPath, @NotNull Set<Principal> principals);  }
@Test public void testGetSupportedPrivileges() throws Exception { List<Privilege> allPrivileges = Arrays.asList(privilegeManager.getRegisteredPrivileges()); Privilege[] supported = acMgr.getSupportedPrivileges(testPath); assertNotNull(supported); assertEquals(allPrivileges.size(), supported.length); assertTrue(allPrivileges.containsAll(Arrays.asList(supported))); }
@Test public void testGetSupportedPrivilegesInvalidPath() { for (String path : getInvalidPaths()) { try { acMgr.getSupportedPrivileges(path); fail("Expects valid node path, found: " + path); } catch (RepositoryException e) { } } }
@Test(expected = PathNotFoundException.class) public void testGetSupportedPrivilegesNonExistingPath() throws Exception { acMgr.getSupportedPrivileges(nonExistingPath); }