Skip to content

Add restriction

The Add restriction action locks a page down to a chosen audience using Confluence’s native page-restriction model. On entry to a state with this action, Aura Workflows writes a viewer or editor restriction made up of the people and groups you selected, plus the page author, the page owner, and the Aura Workflows app itself so the workflow can keep operating on the page.

The action is configured under a state’s Actions section in the Workflow Builder. It runs in the main phase, after Remove restrictions has finished and before Publish page runs.

Restrict page to is the audience: a multi-select that takes any combination of users, groups, and users-typed variables. Variables resolve at the moment the action runs, so a workflow used across many pages can carry an audience that varies per page, such as @reviewers_group, @page_owner_group, or whatever the workflow declares.

Access type is View or Edit. View gives the listed audience read-only access to the page. Edit gives them both read and write, since a Confluence edit restriction implies a view restriction, so editors automatically count as viewers as well.

Two behaviors control who else gets access. Author has access at all times is on by default and keeps the page author (and the page owner, where Confluence tracks one separately) in both the view and edit lists, regardless of what you put under Restrict page to. Without this you could lock yourself or the original author out of a page mid-workflow. If you turn it off, the author is not added to the restriction, and neither is an owner who is also the author. An owner who is a different person is still added. Reviewers get access during reviews is always on and adds the current approval’s pending reviewers to the view list, so anyone who needs to read the page to vote on it can. The reviewer list is captured when the action runs, against the approval that triggered the transition; later reviewer changes are picked up separately by the reviewer-assignment hook and do not require the action to run again.

Apply to, under Advanced options, chooses which pages get the restriction: This page (the default), Published pages, or This page and published pages. It only shows when a site admin has turned on Allow Restriction Actions to target Published Pages under Administration > Features. See Published pages below.

This is the single most important behavior to know. Confluence’s restriction API merges the entries you submit with the entries already on the page. If a previous state restricted the page to Group A and the new state’s Add restriction lists Group B, a page entering that state ends up restricted to both A and B unless something cleared A first. That something is Remove restrictions in the early phase of the same state. The execution model is built for this pairing: the early phase finishes before the main phase starts, so the wipe always happens before the new list is written.

If you genuinely want to add to an existing audience (broadening a published page’s editor list as it moves through a final approval, for instance), leave Remove restrictions off and Add restriction layers on top. Most workflows do not want this; reach for it deliberately.

For an Edit restriction, the selected users and groups go onto both the read list and the update list, and the page author, owner, and the Aura Workflows app user are added to both as well. For a View restriction, the selected users and groups go onto the read list only; the update list still receives the author, owner, and app user so the page is not orphaned, but selected entities cannot edit. In either case the current approval’s reviewers are added to the read list so they can open the page they are voting on.

User-typed variables expand at run time into their underlying users and groups. A variable holding two users and one group contributes two users to the user list and one group to the group list of the resulting restriction.

Published pages are the copies the Publish page action created from this page, one per target space. With Published pages or This page and published pages, each of them gets only what’s configured in the action: the audience under Restrict page to, plus the Aura Workflows app and the published page’s own author and owner, following the Author has access at all times setting. Nothing else is copied from this page, so its author and its reviewers don’t get access to published pages. Aura Workflows changes published pages as the app, so the person who moves the page doesn’t need access to the target space.

Each run changes at most 5 published pages. If a page was published to more than 5 spaces, only the 5 most recently created published pages are changed and the others are left as they are.

The restriction is applied once, each time the action runs. It’s not a sync: later changes to this page or its reviewers don’t reach published pages.

If a site admin turns off Allow Restriction Actions to target Published Pages under Administration > Features, saved actions keep their Apply to choice, but every restriction action only changes this page, whatever its Apply to says. That includes actions set to Published pages. Turning the setting back on restores the saved choice.

Turn this setting on with care. It can escalate privileges: restriction actions change published pages as the app, so anyone who can configure a workflow or move a page through it can change who sees or edits pages in spaces they can’t access themselves. Published pages are found through Aura Workflows’ stored page mappings, and a mapping can also point to an existing page with the same title in the target space, even if Aura Workflows didn’t create that page. Restriction actions change such a page as well.

The action only reaches pages that are already published. It runs before Publish page on the same state, so a page that this state publishes for the first time doesn’t get the restriction this way; turn on Include permissions in the publish action to copy it instead. For a page that was never published, the published part of the action does nothing.

To hide a page in both spaces and bring it back later at the same place in the page tree:

  • On the state that hides the page, use Add restriction with This page and published pages, limited to the people who should still see it. The state doesn’t need a publish action.
  • On the state the page goes back to, use Remove restrictions with This page and published pages. If the published page should stay hidden until the next approval, use This page there instead, and add Remove restrictions with Published pages to the approved state.

A reference to a deleted user or a group that no longer exists surfaces as a per-action error in the page’s history timeline. The transition still completes (the page moves into the state), but the restriction may be partial or missing depending on where in the call the failure landed. Variables that resolve to an empty list do not fail; the action simply contributes nothing from that variable, and the author, owner, and app user still get written.

If one of the pages can’t be changed, for example because a published page was deleted in the meantime, the action still changes all other pages and reports the failure in the history timeline.

Restrictions are visible to admins through Confluence’s own restriction dialog on the page. If a workflow’s restriction behavior is not what you expect, opening that dialog is the fastest way to see what Aura Workflows wrote and what was left over from before.