Interface MacroPermissionPolicy

  • All Known Implementing Classes:
    AbstractScriptMacroPermissionPolicy

    @Role
    public interface MacroPermissionPolicy
    Decides whether a Script Macro can execute or not. Script Macros should implement this Role with a Hint being the same as the Macro Hint.
    Since:
    4.1M1
    Version:
    $Id: c3b49fcbdc0d685121a7a07a77e1a48495b0156e $
    • Method Detail

      • hasPermission

        boolean hasPermission​(ScriptMacroParameters parameters,
                              org.xwiki.rendering.transformation.MacroTransformationContext context)
        Verifies if the current execution Script Macro is allowed to execute its content or not.
        Parameters:
        parameters - the executing macro parameters
        context - the transformation context in which the current macro is executing
        Returns:
        true if the script can execute or false otherwise