Created
September 28, 2017 15:33
-
-
Save douglascrp/0a6353ae143e71466358c93b7e77c225 to your computer and use it in GitHub Desktop.
Set alfresco node site role based permission using javascript
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
// Print object's permissions | |
logger.warn(document.directPermissions); | |
logger.warn(document.fullPermissions); | |
// Stop permission inheritance | |
document.setInheritsPermissions(false); | |
// Give a specific group the SiteCollaborator permission | |
document.setPermission("SiteCollaborator", "GROUP_docs_cliente_empreendimento"); | |
// If needed, it is possible to clean all the custom defined permissions | |
siteService.cleanSitePermissions(document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment