plcs2 = acMgr.getEffectivePolicies(childNPath);
assertFalse(Arrays.equals(plcs, plcs2));
verifyACEs(plcs2, path, 2);
// still a single ACE at childNPath. but privileges must be adjusted
verifyACEs(plcs2, childNPath, 1);
AccessControlList acl = null;
for (AccessControlPolicy p : plcs2) {
if (p instanceof JackrabbitAccessControlList && childNPath.equals(((JackrabbitAccessControlList) p).getPath())) {
acl = (AccessControlList) p;
}
}
Privilege[] privs = privilegesFromNames(new String[] {Privilege.JCR_ADD_CHILD_NODES, Privilege.JCR_REMOVE_CHILD_NODES});
assertEquals(privs, acl.getAccessControlEntries()[0].getPrivileges());
// --- test4: remove policy at childNPath ------------------------------
acMgr.removePolicy(childNPath, acMgr.getPolicies(childNPath)[0]);
superuser.save();