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 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:

  1. Select the Space you want to work with. 
  2. When Page(s) appears, select specific pages within the space to work with, or select the entire space.
  3. Choose one of the following three options 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. Entering users and groups into these fields restricts the selected groups/users from editing the pages/spaces.
    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. Entering users and groups into these fields restricts the selected groups/users from viewing and editing the pages/spaces.
  4. 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: 

  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