Update Page Restrictions
Using the Update Page Restrictions built-in script, you can easily manage the editing restrictions 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. Running this script will replace any existing restrictions that the selected content has.
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 Restriction Level:
- Anyone can view and edit
- Anyone can view, only users and groups chosen in this script can edit
When you select this option, two more fields appear: Groups and Users, where you determine which users and groups can edit. - Only users and groups chosen in this script can view and edit
When you select this option, two more fields appear: Groups and Users, where you determine which users and groups can view and edit.
- 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 restrictions 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 Only users and groups chosen in this script can view and edit for Restriction Level.
- Enter customers for Groups.
- Select Run.
After running the script, you will see the result of the script: