Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Each macro that can be restricted must have

a

at least one configuration entry in the Macro Security properties file. This is known as a Use Restrictions.

For example, the Cache macro might have an entry that looks like one of the following:

Code Block
languagetext
linenumberstrue
cache = *ANY
cache = confluence-administrators
cache = confluence-administrators, trusted-users-cache
cache = bswift
cache = space:DEMO

In the above example:

  • "cache" is the property key and the information after the equal sign (=) is the property value.
  • Both property keys and property values are case-sensitive.
  • Property values are a comma separated list of groups or userids, or space keys in the form of space:xxx where "xxx" is the space key.
  • Line 1 uses *ANY to denote that anyone can
add
  • create and edit content that uses the Cache macro
in Confluence content
  • , effectively making its use "unrestricted."
  • Line 2 indicates that
the Cache macro can
  • only
be added and edited by
  • members of the "confluence-administrators" group can create and edit content that uses the Cache macro. (Content using the Cache macro would require an "edit" page restriction indicating only members of the "confluence-administrators" group can edit the page or, alternatively, an "edit page restriction to one or more userids who are members of the confluence-administrators group.)
  • Line 3 indicates that
the Cache macro can
  • only
be added and edited by
  • members of
either
  • the "confluence-administrators"
or
  • and "trusted-users-cache"
group
  • groups can create and edit content that uses the Cache macro. (Content using the Cache macro would require an "edit" page restriction indicating that only members of the "confluence-administrators" group and/or "trusted-users-cache" group can edit the page or, alternatively, an "edit page restriction to one or more userids who are members of those groups.)
  • Line 4 indicates that
the Cache macro can
  • only
be added and edited by
  • the user "bswift" can create or edit content that uses the Cache macro. (Content using the Cache macro would require an "edit" page restriction indicating only user "bswift" can edit the page.)
  • Line 5 indicates that
the Cache macro can
  • only
be added and edited on content residing in
  • content within the space having a
space key
  • spaceKey of "DEMO" can use the Cache macro.
"
  • (The space would require space-level permissions that indicate only trusted users and/or groups can add pages, blogs or comments. These trusted users and/or groups need not be listed in the properties file on the entry—like this one—that uses space-based Macro Security.)

You can also combine several of these into a single entry if you like, such as:

Code Block
cache = confluence-administrators, trusted-users-cache, bswift
Panel
bgColor#efefef

On this page:

Table of Contents
maxLevel3

Div
stylepadding-left: 40px;
The following table provides some examples of correct and incorrect combinations: Table plus
columnTypesI,S,S,E
columnAttributes,width: 200px,,
 Properties File"edit" Page Restriction(s)
on page using the SQL macroResult
((tick)=Valid, (error)=Invalid)1
 
  1. confluence-administrators
(tick)2
  1. bswift
  2. confluence-administrators
(error)
because userid "bswift" isn't listed in the SQL entries in the properties file