Restrict Content macro key and configuration options.

Key

restrict-content

ParameterDescriptionValue(s)Example(s)
Space Key(s)grants access to space viewers; when the Any Space box is unchecked, users must have the View permission for all spaces
  • space key
  • PRESS PINBOARDS

  • PRESS,PINBOARDS

Any Spacetoggles between granting access to viewers of all spaces or any space
  • checkmark
 
Page Titlegrants access to users who can view the specified page
  • page title
  • Theme Press Macros

  • PRESS:Theme Press Macros

Authenticated Usersdefines how to handle access for authenticated users; inherit current macro restrictions, hide content, show content
  • inherit
  • hide
  • show
 
Anonymous Usersdefines how to handle access for anonymous users; inherit current macro restrictions, hide content, show content
  • inherit
  • hide
  • show
 
Client Typegrants access to a specific type of computer client
  • all
  • desktop
  • mobile
  • all

Allow Usersgrants access to a list of users
  • usernames
  • charles_dickens,emily_dickinson

Allow Groupsgrants access to a list of groups
  • user groups
  • confluence-users,theme-press-users

Exclude Usersrestricts access from a list of users
  • usernames
  • charles_atlas,robbie_lee

Exclude Groupsrestricts access from a list of groups
  • user groups
  • space-editors,guests

Display in Paragraph*toggles between showing restricted content inline with other content or within its own paragraph
  • checkmark
 
HTTP Header Fieldsgrants access to HTTP requests when the HTTP header field matches any of the specified name/value pairs
  • header-name=value

Plain matches:

  • City=Seattle

  • City=Seattle;City=Portland

Regular expression matches:

  • ipaddress=/128\.128\.200\.d+/

  • ipaddress=/128\.128\.200\.d+/;ipaddress=/128\.128\.210\.d+/

  • User-Agent=/.*Mac.*/

Entire value must match. Use .* or .+ to match unknown characters, as in the Mac example.

We recommend using https://regex101.com/ for testing expressions.

Match All Header Fieldstoggles between granting access when any or all HTTP header fields match
  • checkmark
 
Consolation Prize HTML Elementtargets an HTML element and allows restricted users to see that content; use the HTML Wrap macro and its Hide parameter to insert the consolation prize element  

* Removed in 2.0.

If using:

  1. Replace me with something to note about the content on this page that falls outside the scope of the Reference section; and
  2. Add the tight-bottom class to the Reference block above to narrow the gap between the two blocks.