Add/Remove Restrictions to Parent and Child Pages
Using the Add/Remove Restrictions to Parent & Child Pages built-in script, you can easily manage the editing permissions to the pages in your space. It is quick and easy to select multiple page trees or individual pages to set page restrictions in bulk rather than one-by-one. By selecting a parent page, you’ll apply all the restrictions to that page and all of its descendants.
Follow these steps to run the built-in script:
- Select the Space you want to work with.
- When Page(s) appears, select specific pages within the space to work with, or select the entire space.
- Choose one of the following three options for Permission Level:
- No Restrictions (everyone can view and edit this page)
- Editing Restricted (everyone can view, only some can edit)
When you select this option, two more fields appear: Groups and Users, where you determine where restrictions are placed. Entering users and groups into these fields restricts the selected groups/users from editing the pages/spaces. - Viewing and Editing Restricted (only some people can view or edit)
When you select this option, two more fields appear: Groups and Users, where you determine where restrictions are placed. Entering users and groups into these fields restricts the selected groups/users from viewing and editing the pages/spaces.
- Select Run.
Instead, you can select Preview to view changes before implementing them.
Once you run the script, the Results of the script appear. Restrictions are applied to the selected page and all ancestors of the page. However, this feature does not override the Confluence permission hierarchy. If you change the permission of a page, or set of pages, the restrictions of an ancestor of the page with a higher level of restrictions are observed.
Read more about page restrictions in the Confluence Page Restrictions documentation.
Examples
Restrict editing and viewing restrictions of certain pages to a certain group
Using this built-in script, you can restrict certain pages within a space to certain groups of users. In the following example, we will restrict pages in a Customer Analytics section in the Analytics space to the customers group. Only they will be able to edit and view the pages.
To set up the script, follow these steps:
- Enter Analytics for Space.
- Select Customer Analytics for Pages.
- Pick Viewing and Editing Restricted (only some people can view or edit) for Permission Level.
- Enter customers for Groups.
- Select Run.
After running the script, you will see the result of the script: