Expand my Community achievements bar.

SOLVED

What's the possibility of handling Groups permissions using script?

Avatar

Community Advisor

Hi Team,

Is that possible to create a script to meet following requirements:

Example Content structure:

/content

     /site-name

           /one

                   /Products

                   /Services

                   /Careers

           /two

                   /Products

                   /Services

           /three

                   /Products

                   /Services

                   /Careers

           /four

                   /Products

                   /Careers

I know the site name, and page(s) for which I need to enable 'Read' access and for remaining pages we need to 'disable' Read access. For example, When we give 'Read' access to the 'xyz' group on 'site-name' level, then 'xyz' group will have access to all the levels under 'site-name' . But now my requirement is to enable 'read' access to only specific pages(Eg: Eanble 'Read' access to Products & Services pages.) but not all. 

I would like to hear the possibilities.. Quick response would be appreciated..

Thanks In advance.

1 Accepted Solution

Avatar

Correct answer by
Level 10
4 Replies

Avatar

Level 2

are you planning to change the 'access' dynamically at runtime ..

never tried this before but you may have two groups one for all levels

and one for 'restricted' pages .. then move users from group a to b.

If it is just about creating 'groups' with script, treat them as normal nodes

and make sure you have set the mandatory properties as per the api.

- Venu Gummadala

Avatar

Level 10

From UI not possible without manually setting permissions on sub pages. Have you tried glob restrictions?

Avatar

Community Advisor

Thanks for the replies.

Sham; It is difficult for us to set permissions manually using UI as we have hundreds of pages with sub level and set the same permissions for different groups. Can you please elaborate what do you mean by glob restrictions.  

Avatar

Correct answer by
Level 10