Sha256: f74b1a67c7e9c0e293ec87cf314ddaa576ffeb61a89f88c3d855f3e24040ec3f

Contents?: true

Size: 702 Bytes

Versions: 57

Compression:

Stored size: 702 Bytes

Contents

module Foreman::Controller::Parameters::PolicyApi
  extend ActiveSupport::Concern

  class_methods do
    def filter_params_list
      [:description, :name, :period, :scap_content_id, :scap_content_profile_id, :deploy_by,
       :weekday, :day_of_month, :cron_line, :tailoring_file_id, :tailoring_file_profile_id,
       :location_ids => [], :organization_ids => [], :hostgroup_ids => [], :host_ids => []]
    end

    def policy_params_filter
      Foreman::ParameterFilter.new(::ForemanOpenscap::Policy).tap do |filter|
        filter.permit filter_params_list
      end
    end
  end

  def policy_params
    self.class.policy_params_filter.filter_params(params, parameter_filter_context)
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
foreman_openscap-10.0.3 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-10.0.2 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-10.0.1 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-10.0.0 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-9.0.4 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-9.0.3 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-9.0.2 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-9.0.1 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-9.0.0 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-8.0.0 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-7.1.1 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-7.1.0 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-7.0.0 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-6.0.0 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-5.2.3 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-5.2.2 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-5.1.1 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-5.2.1 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-5.2.0 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-5.1.0 app/controllers/concerns/foreman/controller/parameters/policy_api.rb