Forked from mchrominski/restrictions-prefixes.groovy
Created
February 22, 2016 01:40
-
-
Save dfparker2002/0c5bc49af5f7f8eee114 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