Supported from Bamboo 11.0.
Freemarker Allowlist plugin modules allow plugins to define methods allowed to be invoked from Freemarker templates.
The root element for the Freemarker method allowlist module is freemarkerAllowlist
. It allows the following attributes and child elements for configuration:
Name* | Description |
---|---|
state
| Indicate whether the plugin module should be disabled by default (value='disabled') or enabled by default (value='enabled'). Default: enabled. |
i18n-name-key | The localisation key for the human-readable name of the plugin module. |
key | The unique identifier of the plugin module. You refer to this key to use the resource from other contexts in your plugin, such as from the plugin Java code.
In the example, |
name | The human-readable name of the plugin module. Used only in the plugin's administrative user interface. |
*key attribute is required.
The tables summarises the elements. The sections below contain further information.
Name | Description |
---|---|
Defines a method that is allowed to be used in Freemarker templates by the plugin | |
description | The description of the plugin module. The 'key' attribute can be specified to declare a localisation key for the value instead of text in the element body. i.e. the description of the Freemarker allowlist. |
Method should contain fully qualified names including the package, class, method name, and full-qualified type names of the parameters delimited by commas, as shown below:
1 2<method>com.example.ClassName#methodName(java.lang.String,boolean)</method>
Here is an example atlassian-plugin.xml
file containing a single Freemarker allowlist:
1 2<atlassian-plugin name="Hello World Plugin" key="example.plugin.helloworld" plugins-version="2"> <plugin-info> <description>A basic Freemarker allowlist module test</description> <vendor name="Atlassian Software Systems" url="http://www.atlassian.com"/> <version>1.0</version> </plugin-info> <freemarkerAllowlist key="freemarker-allowlist" name="Freemarker Allowlist"> <method>com.example.ClassName#methodName(java.lang.String,boolean)</method> </freemarkerAllowlist> </atlassian-plugin>
Rate this page: