Class PluginAwareOgnlAllowlistManager

java.lang.Object
com.atlassian.bamboo.struts.PluginAwareOgnlAllowlistManager

@Internal public class PluginAwareOgnlAllowlistManager extends Object
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 Details

    • PluginAwareOgnlAllowlistManager

      @Inject public PluginAwareOgnlAllowlistManager(@NotNull @NotNull com.atlassian.plugin.PluginAccessor pluginAccessor, @NotNull @NotNull com.atlassian.plugin.event.PluginEventManager pluginEventManager)
  • Method Details

    • isClassAllowed

      public boolean isClassAllowed(@NotNull @NotNull Class<?> clazz)
      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

      public void registerClassForPlugin(com.atlassian.plugin.Plugin plugin, String moduleCompleteKey, String className)
    • registerClassesForPlugin

      public void registerClassesForPlugin(com.atlassian.plugin.Plugin plugin, String moduleCompleteKey, Set<String> classNames)
    • registerPackagesForPlugin

      public void registerPackagesForPlugin(com.atlassian.plugin.Plugin plugin, String completeKey, Set<String> ognlAllowlistPackages)