public static void removePolicies()

in src/main/java/org/apache/sling/jcr/repoinit/impl/AclUtil.java [215:230]


    public static void removePolicies(@NotNull Session session, @NotNull List<String> paths) throws RepositoryException {
        AccessControlManager acMgr = session.getAccessControlManager();
        for (String jcrPath : getJcrPaths(session, paths)) {
            if (!isValidPath(session, jcrPath)) {
                LOG.info("Cannot remove ACL; no node at {} ", jcrPath);
                continue;
            }
            LOG.info("Removing access control policy at {}", jcrPath);
            JackrabbitAccessControlList acl = getAccessControlList(acMgr, jcrPath, false);
            if (acl == null) {
                LOG.info("No ACL to remove at path {}", jcrPath);
            } else {
                acMgr.removePolicy(jcrPath, acl);
            }
        }
    }