Created
September 27, 2015 12:19
-
-
Save mchrominski/84b887223d6d35806cd2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def applyRestriction(path, prefix) { | |
def acl = getAcl(path) | |
def restrictions = new HashMap<String, Value>() | |
def values = new Value[1] | |
values[0] = session.getValueFactory().createValue(prefix) | |
restrictions.put("rep:prefixes", values) | |
acl.addEntry(principal, privileges, false, emptyMap, restrictions) | |
acMgr.setPolicy(acl.getPath(), acl); | |
session.save(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment