Sha256: f43c4a7c8f3475d5819528385c4cab286dd7204b3cbb3a4ee74e3cc0376dac54

Contents?: true

Size: 1.22 KB

Versions: 101

Compression:

Stored size: 1.22 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

101 entries across 101 versions & 1 rubygems

Version Path
foreman_remote_execution-14.1.4 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-14.1.3 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-14.1.2 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-14.1.1 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-14.1.0 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-14.0.2 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-14.0.1 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-13.2.6 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-14.0.0 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-13.2.5 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-13.2.4 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-13.2.3 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-13.2.2 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-12.0.7 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-13.2.1 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-13.2.0 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-10.1.3 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-13.0.0 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-12.0.5 app/controllers/concerns/foreman/controller/parameters/job_template.rb
foreman_remote_execution-12.0.4 app/controllers/concerns/foreman/controller/parameters/job_template.rb