AnsweredAssumed Answered

Retain Permissions

Question asked by ktavasalo on May 12, 2013
Latest reply on May 14, 2013 by afaust
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!!

Outcomes