diff --git a/modules/accredited_representative_portal/app/controllers/accredited_representative_portal/v0/power_of_attorney_requests_controller.rb b/modules/accredited_representative_portal/app/controllers/accredited_representative_portal/v0/power_of_attorney_requests_controller.rb index 92e3c70c89d..5c9f87a1a60 100644 --- a/modules/accredited_representative_portal/app/controllers/accredited_representative_portal/v0/power_of_attorney_requests_controller.rb +++ b/modules/accredited_representative_portal/app/controllers/accredited_representative_portal/v0/power_of_attorney_requests_controller.rb @@ -9,7 +9,7 @@ def index end def show - if poa_request && PowerOfAttorneyRequestPolicy.new(current_user, poa_request).show? + if poa_request && authorize(poa_request, :show?, policy_class: AccreditedRepresentativePortal::PowerOfAttorneyRequestPolicy) render json: { data: poa_request } else head :not_found diff --git a/modules/accredited_representative_portal/spec/controllers/concerns/accredited_representative_portal/authenticable_spec.rb b/modules/accredited_representative_portal/spec/controllers/concerns/accredited_representative_portal/authenticable_spec.rb index 15075738f48..1e712bc1417 100644 --- a/modules/accredited_representative_portal/spec/controllers/concerns/accredited_representative_portal/authenticable_spec.rb +++ b/modules/accredited_representative_portal/spec/controllers/concerns/accredited_representative_portal/authenticable_spec.rb @@ -7,6 +7,8 @@ def index head :ok end + + def verify_pundit_authorization; end end let(:representative_user) { create(:representative_user) }