return modifyPrivileges(path, testUser.getPrincipal(), privilegesFromName(privilege), isAllow, getRestrictions(superuser, path));
}
private JackrabbitAccessControlList modifyPrivileges(String path, Principal principal, Privilege[] privileges, boolean isAllow, Map<String, Value> restrictions) throws NotExecutableException, RepositoryException {
JackrabbitAccessControlList tmpl = getPolicy(acMgr, path, principal);
tmpl.addEntry(principal, privileges, isAllow, restrictions);
acMgr.setPolicy(tmpl.getPath(), tmpl);
superuser.save();
// remember for clean up during teardown