Skip to content

Instantly share code, notes, and snippets.

@cmlewis
Created August 7, 2017 20:35
Show Gist options
  • Save cmlewis/f56231e520440d6bfcd355e603eb82dd to your computer and use it in GitHub Desktop.
Save cmlewis/f56231e520440d6bfcd355e603eb82dd to your computer and use it in GitHub Desktop.
Alfresco - Update Permissions on Node
var nodes = search.luceneSearch('@hpi\\:trac:"HR"');
logger.log("Document Count: " + nodes.length);
for each(var node in nodes) {
node.setPermission("Read", "GROUP_HR");
node.setPermission("Read", "GROUP_HPI_CONSUMERS");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment