Package com.atlassian.bamboo.struts
Class PluginAwareOgnlAllowlistManager
java.lang.Object
com.atlassian.bamboo.struts.PluginAwareOgnlAllowlistManager
This class is responsible for managing the OGNL allowlist for plugins. It allows plugins to register classes that
should be allowed to be used in OGNL expressions dynamically.
-
Constructor Summary
ConstructorsConstructorDescriptionPluginAwareOgnlAllowlistManager
(@NotNull com.atlassian.plugin.PluginAccessor pluginAccessor, @NotNull com.atlassian.plugin.event.PluginEventManager pluginEventManager) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isClassAllowed
(@NotNull Class<?> clazz) Checks if a given class is allowlisted.void
onPluginDisabled
(com.atlassian.plugin.event.events.PluginDisabledEvent event) void
onPluginEnabled
(com.atlassian.plugin.event.events.PluginEnabledEvent event) void
void
registerClassesForPlugin
(com.atlassian.plugin.Plugin plugin, String moduleCompleteKey, Set<String> classNames) void
registerClassForPlugin
(com.atlassian.plugin.Plugin plugin, String moduleCompleteKey, String className) void
registerPackagesForPlugin
(com.atlassian.plugin.Plugin plugin, String completeKey, Set<String> ognlAllowlistPackages)
-
Constructor Details
-
PluginAwareOgnlAllowlistManager
@Inject public PluginAwareOgnlAllowlistManager(@NotNull @NotNull com.atlassian.plugin.PluginAccessor pluginAccessor, @NotNull @NotNull com.atlassian.plugin.event.PluginEventManager pluginEventManager)
-
-
Method Details
-
isClassAllowed
Checks if a given class is allowlisted. It checks only the dynamic configuration registered in this service, not the static struts configuration.- Parameters:
clazz
- the class which will evaluated- Returns:
- true if the class is allowlisted
-
postConstruct
@PostConstruct public void postConstruct() -
onPluginEnabled
public void onPluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent event) -
onPluginDisabled
public void onPluginDisabled(com.atlassian.plugin.event.events.PluginDisabledEvent event) -
registerClassForPlugin
-
registerClassesForPlugin
-
registerPackagesForPlugin
-