AnsweredAssumed Answered

how to set permission on node?

Question asked by zengqingyi12 on May 24, 2009
i found can set permission like

var permissions = [];
permissions["GROUP_EVERYONE"] = "SiteCollaborator";
permissions["GROUP_hello"] = "SiteCollaborator";
site.setPermissions(folderNode, permissions);

and when i want to set the permissions of the same node:

var permissions = [];
permissions["GROUP_world"] = "SiteCollaborator";
site.setPermissions(folderNode, permissions);

if i do this, the permissions of GROUP_EVERYONE and GROUP_hello will loss.
And i found there is a function site.sitePermissionGroups will return the group setted before,
but it will only return the site's build group:
permissions["GROUP_EVERYONE"] = "SiteCollaborator";
so if i use site.sitePermissionGroups to get the permission settings previous, I will loss
permissions["GROUP_hello"] = "SiteCollaborator";

I want to know whether there are any other function which i can get all the permission settings of the node ?

Thanks in advance.~~~

Outcomes