Sha256: 36c456825e900957dc9538fc61bd6c17f7f601dbb1acd872a12cbe4f4484da4b

Contents?: true

Size: 564 Bytes

Versions: 25

Compression:

Stored size: 564 Bytes

Contents

# frozen_string_literal: true

class PreupgradeReportsController < ::Api::V2::BaseController
  include ApiAuthorizer

  def index
    @preupgrade_reports = resource_scope.includes(:preupgrade_report_entries).search_for(*search_options)
  end

  private

  # By overriding :path_to_authenticate we can require REX's :view_job_invocations permission
  def path_to_authenticate
    Foreman::AccessControl.normalize_path_hash params.slice(:action, :id, :user_id)
                                                     .merge({ controller: 'job_invocations' })
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
foreman_leapp-0.1.4 app/controllers/preupgrade_reports_controller.rb
foreman_leapp-0.1.3 app/controllers/preupgrade_reports_controller.rb
foreman_leapp-0.1.2 app/controllers/preupgrade_reports_controller.rb
foreman_leapp-0.1.1 app/controllers/preupgrade_reports_controller.rb
foreman_leapp-0.1.0 app/controllers/preupgrade_reports_controller.rb