Sha256: f633c2022fa8b60e31df6fe53ff8d2bfae4ccaa2d6a0cc4e3b5988287f508a40

Contents?: true

Size: 496 Bytes

Versions: 23

Compression:

Stored size: 496 Bytes

Contents

# To be replaced by find_resource, FindCommon after 1.6 support is deprecated
module ForemanDocker
  module FindContainer
    extend ActiveSupport::Concern

    def find_container
      if params[:id].blank?
        not_found
        return
      end
      @container = Container.authorized("#{action_permission}_#{controller_name}".to_sym)
                   .find(params[:id])
    end

    def allowed_resources
      ForemanDocker::Docker.authorized(:view_compute_resources)
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
foreman_docker-5.0.0 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-4.1.1 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-4.1.0 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-4.0.0 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-3.2.1 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-3.2.0 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-3.1.0 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-3.0.0 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-2.1.1 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-2.1.0 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-2.0.1 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-2.0.0 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-1.4.1 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-1.4.0 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-1.3.1 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-1.3.0 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-1.2.4 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-1.2.3 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-1.2.2 app/controllers/concerns/foreman_docker/find_container.rb
foreman_docker-1.2.1 app/controllers/concerns/foreman_docker/find_container.rb