Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Teams
, (opens new window)

Macro Security for Confluence
Results will update as you type.
  • Release notes
  • Release Documentation
    • 4.x
    • 3.x
      • Administrator's Guide
        • Understanding How Macro Security Works
        • Installing the Add-on
        • Macro Security Managed Macros
        • Configuring and Enabling Macro Security
        • Example Configurations
        • Using the Trusted Spaces Approach
        • Using Macro Security with the Live Template Macro
        • Using the Macro Security Macro to Control User Macros
        • Implementing Macro Security Support in Add-ons
        • Disabling and Uninstalling Macro Security
        • Downloads
        • How to get problem determination information
      • User's Guide
    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    Using the Macro Security Macro to Control User Macros

    Using the Macro Security Macro to Control User Macros

    Dec 04, 2015

    Overview

    The macro-security macro is primarily a tool for administrators to enable usage control of user macros. When included in the logic of a user macro, it can be used to control who can edit content containing the user macro in a manner very similar to how other macro security controlled macros work.

    Macro Security macro

    The Macro Security macro is generally not used directly on a page. Instead, it is used within a user macro to enforce any restrictions coded for that user macro within the Macro Security properties file configured by a Confluence Administrator.

    For testing purposes, you may wish to temporarily add the Macro Security macro to a page. To do this, you will need to type the entire markup shortcut in the editor to insert it, as the Macro Security macro is deliberately not visible in the Macro Browser.

    Markup Shortcut{macro-security}

    Screenshot

     On This Page:

    Parameters

    The Macro Security macro accepts 3 parameters.

    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:

    1. 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:

      restricted = confluence-administrators
    2. 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:

     

     

     

     

     

    , multiple selections available,

    Need support? Create a request with our support team.

    Copyright © 2005 - 2025 Appfire | All rights reserved.

    {"serverDuration": 13, "requestCorrelationId": "8580de2156ac45ee9a8e4246fb38a170"}