cancel
Showing results for 
Search instead for 
Did you mean: 

Retain Permissions

ktavasalo
Champ on-the-rise
Champ on-the-rise
Hello everyone.I have a problem. In my Alfresco Share, every user space has a folder "Private Space". Files inside the user space but not in the "Private Space" can be seen by other users. Files inside "Private Space" are not seen by others. Now, my practicum supervisor wants me to modify Alfresco Share wherein if a file inside "Private Space" is moved outside, its permission will retain. It means that users must not see the file. Also, if a file inside the user space but not in the "Private Space" is moved to "private Space", its permission is retained. It must not inherit the new parent's permission. How to do it? i have written a script wherein it is triggered when an item leaves the folder. The script is here.

var parNode = document.properties.parent;
var parName = parNode.properties.name;
if(parName == "Private Space"){
document.setInheritsPermissions(true);
}
else{
document.setInheritsPermissions(false);
}


This Script is not working. How is it? Please help me.. Thank you very much!!
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

what is the actual problem / error with your script? Also, you obtain the parent of a document by using document.parent, not document.properties.parent.

Regards
Axel