Add/Remove Restrictions to Parent and Child Pages

In Confluence without ScriptRunner, editing restrictions added to a parent page are not inherited to child pages; however, view restrictions are inherited. Pages need to be restricted individually for editing.

Using the Add/Remove Restrictions to Parent & Child Pages built-in script, you can add the editing restrictions to all of the child pages. It is quick and easy to select multiple page trees or individual pages to set page restrictions in bulk rather than doing it 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:

  1. Select the Space you want to work with. 
  2. When Page(s) appears, you can select specific pages within the space to work with, or you can select the entire space.
  3. You have three options to choose for Permission Level:
    1. No Restrictions (everyone can view and edit this page)
    2. 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.
    3. 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.
  4. Select Run
    Instead, you can select Preview to view changes before implementing them.

Once you select Run, the Results of the script appear. Restrictions are applied to the selected page and all ancestors of this 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: 

  1. Enter Analytics for Space
  2. Select Customer Analytics for Pages
  3. Pick Viewing and Editing Restricted (only some people can view or edit) for Permission Level
  4. Enter customers for Groups.
  5. Select Run.

After running the script, you will see the result of the script:

On this page