Skip to content

Commit

Permalink
Fixes #36955 - Revert back 'Change Puppet CA' action
Browse files Browse the repository at this point in the history
refs: 6cdb8c7
  • Loading branch information
stejskalleos committed Nov 29, 2023
1 parent f3a73bb commit b57afe7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/helpers/puppet_related_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module PuppetRelatedHelper
UI.register_host_description do
multiple_actions_provider :puppet_actions
end

def puppet_actions
return [] unless Foreman::Plugin.installed?('foreman_puppet')
return [] unless authorized_for(:controller => :hosts, :action => :edit)
return [] unless SmartProxy.unscoped.authorized.with_features("Puppet CA").exists?

[{ :action => [_('Change Puppet CA'), select_multiple_puppet_ca_proxy_hosts_path], :priority => 1051 }]
end
end

0 comments on commit b57afe7

Please sign in to comment.