Module: ForemanSalt::SmartProxiesHelperExtensions

Extended by:
ActiveSupport::Concern
Defined in:
app/helpers/concerns/foreman_salt/smart_proxies_helper_extensions.rb

Instance Method Summary collapse

Instance Method Details

#proxy_actions_with_salt_proxy(proxy, authorizer) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'app/helpers/concerns/foreman_salt/smart_proxies_helper_extensions.rb', line 9

def proxy_actions_with_salt_proxy(proxy, authorizer)
  actions = proxy_actions_without_salt_proxy(proxy, authorizer)

  if proxy.has_feature?('Salt')
    actions << display_link_if_authorized(_('Salt Keys'), :controller => 'foreman_salt/salt_keys', :action => 'index', :smart_proxy_id => proxy)
    actions << display_link_if_authorized(_('Salt Autosign'), :controller => 'foreman_salt/salt_autosign', :action => 'index', :smart_proxy_id => proxy)
  end

  actions
end