Sha256: 6bfec0a2f8dc05709b092e8ffc7e6de64cb0b2ab85d881c29c1889cd4bed2c1d

Contents?: true

Size: 1.28 KB

Versions: 49

Compression:

Stored size: 1.28 KB

Contents

module Foreman::Controller::Parameters::JobTemplate
  extend ActiveSupport::Concern
  include Foreman::Controller::Parameters::Taxonomix
  include Foreman::Controller::Parameters::Template
  include Foreman::Controller::Parameters::TemplateInput
  include Foreman::Controller::Parameters::ForeignInputSet

  class_methods do
    def job_template_effective_user_filter
      Foreman::ParameterFilter.new(::JobTemplateEffectiveUser).tap do |filter|
        filter.permit_by_context(:value, :current_user, :overridable,
                                 :nested => true)
      end
    end

    def job_template_params_filter
      Foreman::ParameterFilter.new(::TemplateInput).tap do |filter|
        filter.permit :job_category, :provider_type, :description_format, :execution_timeout_interval,
                      :effective_user_attributes => [job_template_effective_user_filter],
                      :template_inputs_attributes => [template_input_params_filter],
                      :foreign_input_sets_attributes => [foreign_input_set_params_filter]
        add_template_params_filter(filter)
        add_taxonomix_params_filter(filter)
      end
    end
  end

  def job_template_params
    self.class.job_template_params_filter.filter_params(params, parameter_filter_context, :job_template)
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
foreman_remote_execution-2.0.10 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-2.0.9 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-2.0.8 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-3.0.3 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-3.0.2 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-2.0.7 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-3.0.1 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-3.0.0 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-2.0.6 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-2.0.5 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-2.0.4 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-2.0.3 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-2.0.2 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-2.0.1 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-2.0.0 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-1.8.4 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-1.8.3 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-1.8.2 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-1.8.1 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-1.8.0 app/controllers/concerns/foreman/controller/parameters/job_template.rb