Package org.xwiki.rendering.macro.script
Class AbstractScriptMacroPermissionPolicy
- java.lang.Object
-
- org.xwiki.rendering.macro.script.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 Summary
Constructors Constructor Description AbstractScriptMacroPermissionPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ContextualAuthorizationManager
getAuthorizationManager()
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.
-
-
-
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 interfaceMacroPermissionPolicy
- Parameters:
parameters
- the executing macro parameterscontext
- the transformation context in which the current macro is executing- Returns:
- true if the script can execute or false otherwise
-
getAuthorizationManager
protected ContextualAuthorizationManager getAuthorizationManager()
-
-