Class AbstractScriptMacroPermissionPolicy

  • All Implemented Interfaces:
    MacroPermissionPolicy

    public abstract class AbstractScriptMacroPermissionPolicy
    extends Object
    implements MacroPermissionPolicy
    Default Script Macro Permission policy that Script Macro implementations can extends: allow script execution only if the current document has Programming Rights.
    Since:
    4.1M1
    Version:
    $Id: 9a0a1e4d59688ada3a471bcbc4b63fab7e839d42 $
    • Constructor Detail

      • AbstractScriptMacroPermissionPolicy

        public AbstractScriptMacroPermissionPolicy()
    • Method Detail

      • hasPermission

        public boolean hasPermission​(ScriptMacroParameters parameters,
                                     org.xwiki.rendering.transformation.MacroTransformationContext context)
        Description copied from interface: MacroPermissionPolicy
        Verifies if the current execution Script Macro is allowed to execute its content or not.
        Specified by:
        hasPermission in interface MacroPermissionPolicy
        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