Parameters
The Macro Security macro accepts 3 parameters.
Table plus | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
|
Example 1 - Basic Use
This example demonstrates how to add support for a user macro named "restricted" that uses only Use Restrictions. A trusted user or group will be able to add this user macro to a page; other (non-trusted) users and groups will be able to view the page but not edit it. Learn more about Use Restrictions on the Understanding How Macro Security Works page.
There are two steps:
Editing and reloading the Macro Security properties file so it contains a Use Restriction entry for the user macro. This entry might look like this:
Code Block restricted = confluence-administrators
- Coding the user macro so that it invokes the Macro Security macro and then directs its processing based on what is returned from the Macro Security macro.
In the example above:
Table plus | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
|
HTML Comment | ||
---|---|---|
| ||
Example 2 - Advanced UseThis example demonstrates how to add support for a user macro that uses both Use Restrictions and Parameter Restrictions. A trusted user or group will be able to add this user macro to a page; other (non-trusted) users and groups will be able to view the page but not edit it. Learn more about Use Restrictions and Parameter Restrictions on the Understanding How Macro Security Works page. There are two steps:
|
...