Skip to content

Commit

Permalink
Fixes #35217 - Allow overriding proxy action class
Browse files Browse the repository at this point in the history
when using delegated actions
  • Loading branch information
adamruzicka committed Nov 10, 2022
1 parent abdd58e commit 758fb72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/lib/actions/helpers/with_delegated_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 758fb72

Please sign in to comment.