Sha256: 29413bf43acabc3bc41dd596d83a21796b7b35539a2e69b50bf0422f5327065f

Contents?: true

Size: 447 Bytes

Versions: 23

Compression:

Stored size: 447 Bytes

Contents

module ForemanRemoteExecution
  module JobTemplatesExtensions
    def permitted_actions(template)
      original = super(template)

      if template.is_a?(JobTemplate)
        original.unshift(authorized_for(controller: :job_invocations, action: :create) ? link_to(_('Run'), hash_for_new_job_invocation_path(:template_id => template.id).merge(:authorizer => authorizer)) : nil) unless template.snippet
      end

      original
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
foreman_remote_execution-13.2.7 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-15.0.0 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-14.1.4 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-14.1.3 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-14.1.2 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-14.1.1 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-14.1.0 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-14.0.2 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-14.0.1 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-13.2.6 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-14.0.0 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-13.2.5 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-13.2.4 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-13.2.3 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-13.2.2 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-12.0.7 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-13.2.1 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-13.2.0 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-10.1.3 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
foreman_remote_execution-13.0.0 app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb