Sha256: 2f39da318907b02b25795e057a28332feb34edb2a1c35720f5a94aa5af814585

Contents?: true

Size: 604 Bytes

Versions: 16

Compression:

Stored size: 604 Bytes

Contents

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

  class_methods do
    def filter_params_list
      [:description, :name, :period,
       :weekday, :day_of_month, :cron_line,
       :oval_content_id,
       :location_ids => [], :organization_ids => []]
    end

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

  def oval_policy_params
    self.class.oval_policy_params_filter.filter_params(params, parameter_filter_context)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
foreman_openscap-8.0.0 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-7.1.1 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-7.1.0 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-7.0.0 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-6.0.0 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-5.2.3 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-5.2.2 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-5.1.1 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-5.2.1 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-5.2.0 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-5.1.0 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-5.0.0 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-4.3.3 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-4.3.2 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-4.3.1 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
foreman_openscap-4.3.0 app/controllers/concerns/foreman/controller/parameters/oval_policy.rb