Sha256: 29c6aaf93ba7ba46ae6d90b961d9e0001e1a93f90b60695da0146612e7e7f23e

Contents?: true

Size: 991 Bytes

Versions: 197

Compression:

Stored size: 991 Bytes

Contents

module Katello
  class Api::V2::CapsulesController < ::Api::V2::SmartProxiesController
    resource_description do
      api_base_url "/katello/api"
    end

    api :GET, '/capsules', 'List all smart proxies that have content'
    param_group :search, Api::V2::ApiController
    def index
      @smart_proxies = SmartProxy.with_content.authorized(:view_smart_proxies).includes(:features).
                search_for(*search_options).paginate(paginate_options)
      @total = SmartProxy.with_content.authorized(:view_smart_proxies).includes(:features).count
    end

    api :GET, '/capsules/:id', 'Show the smart proxy details'
    param :id, Integer, :desc => 'Id of the smart proxy', :required => true
    def show
      super
    end

    def resource_name
      :smart_proxy
    end

    protected

    def resource_class
      SmartProxy
    end

    def authorized
      User.current.allowed_to?(params.slice(:action, :id).merge(controller: 'api/v2/smart_proxies'))
    end
  end
end

Version data entries

197 entries across 197 versions & 1 rubygems

Version Path
katello-4.10.0 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.9.2 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.10.0.rc2 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.10.0.rc1 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.8.4 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.9.1 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.8.3 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.9.0 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.7.6 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.8.2 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.9.0.rc2 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.9.0.rc1 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.8.1 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.7.5 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.8.0 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.8.0.rc2 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.7.4 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.8.0.rc1 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.7.3 app/controllers/katello/api/v2/capsules_controller.rb
katello-4.7.2 app/controllers/katello/api/v2/capsules_controller.rb