Overview

The {set-restrictions} macro is similar to the {add-restriction} macro in that it sets either View or Edit permissions. However, before doing so, it removes any existing permissions of that type.

Where to use it?

Optional.

One or more {set-restrictions} macros can be put in a {trigger} macro.

Parameters

Parameter

Required

Default

Notes

Ver

type

(tick)


What type of permission to set?

  • view – assign the user/group view permission
  • edit – assign the user/group edit permission
4.5

Note: The permissions are set using Confluence's content-level permissions system and can thus be altered via the padlock icon.

user

(info)


One or more users to assign type permission to:

4.5

group

(info)


One or more user groups to assign type permission to:

4.5
(info) At least one user or group must be specified. Both can also be used at the same time.

Example

This...

{workflow:Restrictions}
   {state:Test}
   {state}
   {trigger:pagecreated}
      {set-restrictions:type=view|user=bob}
 
   {trigger}
{workflow}

...is equivalent to:

{workflow:Restrictions}
   {state:Test}
   {state}
   {trigger:pagecreated}
      {remove-restriction:type=view}
      {add-restriction:type=view|user=bob}
   {trigger}
{workflow}

Using {set-restrictions} (markup on the left) helps avoid permissions errors in the interim period between clearing permissions and adding new permissions (markup on the right).

All examples

See also

External Links:

Workflow Authoring Guide: