Sha256: 856f0f4636de919250cc32da7095230a1009422146bb0b98ac709bf3c2a17ed6

Contents?: true

Size: 631 Bytes

Versions: 27

Compression:

Stored size: 631 Bytes

Contents

module ForemanSalt
  module Concerns
    module SaltModuleParameters
      extend ActiveSupport::Concern

      class_methods do
        def salt_module_params_filter
          Foreman::ParameterFilter.new(::ForemanSalt::SaltEnvironment).tap do |filter|
            filter.permit(:name, :salt_environments => [], :salt_environment_ids => [])
          end
        end
      end

      def salt_module_params
        param_name = parameter_filter_context.api? ? 'state' : 'foreman_salt_salt_module'
        self.class.salt_module_params_filter.filter_params(params, parameter_filter_context, param_name)
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
foreman_salt-14.0.0 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-13.2.4 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-13.2.3 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-13.2.2 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-13.2.1 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-13.2.0 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-13.1.0 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-13.0.0 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-12.0.0 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-11.0.1 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-11.0.0 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-10.3.1 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-10.3.0 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-10.2.0 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-10.1.0 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-8.0.4 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-9.0.1 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-10.0.0 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-9.0.0 app/controllers/foreman_salt/concerns/salt_module_parameters.rb
foreman_salt-8.0.3 app/controllers/foreman_salt/concerns/salt_module_parameters.rb