cancel
Showing results for 
Search instead for 
Did you mean: 

getPermissions() problem

tgmweb
Champ in-the-making
Champ in-the-making
Hi,

I have a web script - and I'm using getPermissions() to return the permissions for a node. However, the returned values don't specify whether permissions are set explicity or whether they've been inherited.

So - if I have a node where 2 groups have access through inheritance, and 2 have access explicitly - there's no way to tell when I get my output which of these groups have explicit permissions.

If I try to remove a group that is inheriting - would it remove them at the lowest level, or give them DENY on the node?
3 REPLIES 3

tgmweb
Champ in-the-making
Champ in-the-making
no - it throws an error! (Can not delete from this acl in a node context SHARED)

In that case, I presume I need to give them deny manually. However, I can't see DENY/ALLOW referenced anywhere in the JavaScript API other than within the getPermissions() method!!!

daz
Champ in-the-making
Champ in-the-making
hi ,
I'm trying to write a webscript in order to apply permissions to a node.
In particular i am trying to setpermission on a node to "DENIED" but am unable to do this.

i can remove permissions …
noderef.removePermission("Editor",<username>);


and set permissions….
noderef.setPermission("Editor", <username>);
this sets the permission to "ALLOW"

but i cant' set the permission to "DENIED"
i have however noticed that the java class allows a boolean to be passed as the final parameter to setPermissions
eg.
noderef.setPermission("Editor",<username>,true) 
. How do I do this in a webscript ?

tonyc
Champ in-the-making
Champ in-the-making
It is my understanding that you only "ALLOW" permission to users or groups.  My guess is that that it the node is inheriting permissions and you want to deny only a particular user or group.  If this is the case I think the approach you should be taking is..

nodeRef.setInheritsPermissions(false);   // Do not inherit permissions
noderef.setPermission("Editor", <username>);    // Specify user/group permissions

Good Luck