From 758fb72005ecbfbc242eec2745c47ac25d62a80d Mon Sep 17 00:00:00 2001 From: Adam Ruzicka Date: Thu, 14 Jul 2022 14:41:09 +0200 Subject: [PATCH] Fixes #35217 - Allow overriding proxy action class when using delegated actions --- app/lib/actions/helpers/with_delegated_action.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/actions/helpers/with_delegated_action.rb b/app/lib/actions/helpers/with_delegated_action.rb index 4d569fd65..687cc0b8b 100644 --- a/app/lib/actions/helpers/with_delegated_action.rb +++ b/app/lib/actions/helpers/with_delegated_action.rb @@ -3,7 +3,7 @@ module Helpers module WithDelegatedAction include ::Actions::Helpers::WithContinuousOutput - def plan_delegated_action(proxy, klass, options) + def plan_delegated_action(proxy, klass, options, proxy_action_class: ::Actions::ProxyAction) case proxy when :not_defined if klass.is_a?(String) @@ -14,7 +14,7 @@ def plan_delegated_action(proxy, klass, options) when :not_available raise Foreman::Exception, _('All proxies with the required feature are unavailable at the moment') when ::SmartProxy - delegated_action = plan_action(::Actions::ProxyAction, proxy, klass, options) + delegated_action = plan_action(proxy_action_class, proxy, klass, options) end input[:delegated_action_id] = delegated_action.id