How to set permission to site's role with webscript?

cancel
Showing results for 
Search instead for 
Did you mean: 
billydekid
Established Member II

How to set permission to site's role with webscript?

Hi,

How to set a document/node permission to site's role (siteCollaborator, siteContributor, siteConsumer) with webscript?

Is it possible with setPermission syntax? [1]

Thank you,

[bayu]

3 Replies
mbajpai
Active Member II

Re: How to set permission to site's role with webscript?

Hi , 

Can you explain more about the issue? You can always check the permission by node.getPermissions method , and set by using node.setPermission(permission,authority) . 

Or may be you are doing something similar as mentioned in this thread -

 

billydekid
Established Member II

Re: How to set permission to site's role with webscript?

Hi Mansha Pandey‌,

Apologize forgot to put the [1] link reference: setPermission | Alfresco Documentation - and thanks for the thread link.

Yes, I want do the similar like in that thread, such as: setPermission("SiteCollaborator","GROUP_Office");

But in the setPermission() documentation above mention the permission parameter are "read-write-delete" only, instead a site's role I supposed.

So, to clarify.. I'ts possible to put site's role in 'permission' parameter of setPermission function. CMIIW.

Thank you.-

mbajpai
Active Member II

Re: How to set permission to site's role with webscript?

SiteCollabotor is a Role . Each Role has a set of permissions.The method setPermission takes permission as an argument.