Sha256: fcfc90dbe6e312066bfd7c01c30a462b88ceb4c6721b3b27b3698fc0ca906a44

Contents?: true

Size: 673 Bytes

Versions: 32

Compression:

Stored size: 673 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,
       :weekday, :day_of_month, :cron_line, :tailoring_file_id, :tailoring_file_profile_id,
       :location_ids => [], :organization_ids => [], :hostgroup_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

32 entries across 32 versions & 1 rubygems

Version Path
foreman_openscap-0.10.2 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.10.1 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.9.3 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.10.0 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.7.13 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.8.6 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.9.2 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.9.1 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.8.5 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.7.12 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.9.0 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.8.4 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.7.11 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.7.10 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.8.3 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.7.9 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.7.8 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.7.7 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.8.2 app/controllers/concerns/foreman/controller/parameters/policy_api.rb
foreman_openscap-0.7.6 app/controllers/concerns/foreman/controller/parameters/policy_api.rb