cancel
Showing results for 
Search instead for 
Did you mean: 

removePermission does not working

gokceng
Champ in-the-making
Champ in-the-making

var btcFolder = companyhome.childrenByXPath("cm:BTC")[0];
var outgoingFolder = btcFolder.childrenByXPath("cm:Outgoing")[0];

var outgoingDocs = outgoingFolder.getChildren();

for(i in outgoingDocs)
{
   var child = outgoingDocs[i];
   if(child.getType() == "{http://www.alfresco.org/model/content/1.0}folder")
      continue;
   child.setInheritsPermissions(false);
   child.removePermission("Coordinator", "GROUP_ActiveUsers");
   child.save();
}

Without save method doesn't work too. With node browser I see

Inherit:   true
Assigned Permission   To Authority      Access
Coordinator      GROUP_INTEG      ALLOWED
Coordinator      GROUP_ActiveUsers   ALLOWED
Consumer      GROUP_ActiveUsers   ALLOWED

What can be the problem?
4 REPLIES 4

openpj
Elite Collaborator
Elite Collaborator
Are you sure that the for cycle is executed?
Have you tried to use the Javascript Debugger?

gokceng
Champ in-the-making
Champ in-the-making
yes i've tried it and it's cycling as it is expected. I'm using Alfresco 3.0.0 (Stable 1526). I couldn't figure out what the problem is.

gokceng
Champ in-the-making
Champ in-the-making
Anybody has no idea?

lista
Star Contributor
Star Contributor
I suggest looking through JIRA issues, and maybe raising a new one.

Cheers,
Lista.