Sha256: 927a6edaf559a88d0ab8c794116ba3eb24c26444feef41822e65de53883f183a

Contents?: true

Size: 719 Bytes

Versions: 2

Compression:

Stored size: 719 Bytes

Contents

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

  class_methods do
    def docker_registry_params_filter
      Foreman::ParameterFilter.new(::DockerRegistry).tap do |filter|
        filter.permit :name, :url, :username, :password, :description,
                      :location_ids => [], :organization_ids => []
      end
    end
  end

  def docker_registry_params
    param_name = parameter_filter_context.api? ? 'registry' : 'docker_registry'
    self.class.docker_registry_params_filter.filter_params(params, parameter_filter_context,
                                                           param_name
                                                          )
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foreman_docker-3.1.0 app/controllers/concerns/foreman/controller/parameters/docker_registry.rb
foreman_docker-3.0.0 app/controllers/concerns/foreman/controller/parameters/docker_registry.rb