AnsweredAssumed Answered

removePermission not works for ALL users/groups

Question asked by louise on May 17, 2012
Latest reply on May 17, 2012 by louise
I would like to remove "Coordinator" permission for ALL users on a Space, but i've got unexpected result, see example and output below (Alfresco 4.0.d Community, default installed SOLR indexer):

Example JavaScript code:

var node = companyhome.childByNamePath("User Homes/louise");

permissions = node.getPermissions();
print("Before removePermission:");
print(permissions);

node.removePermission("Coordinator");

permissions = node.getPermissions();
print("After removePermission:");
print(permissions);

Output:

Before removePermission:
0 : ALLOWED;louise;All
1 : ALLOWED;ROLE_OWNER;All
2 : ALLOWED;abeecher;Coordinator

After removePermission:
0 : ALLOWED;louise;All
1 : ALLOWED;ROLE_OWNER;All
2 : ALLOWED;abeecher;Coordinator

Outcomes