Project

General

Profile

Actions

Bug #3141

closed

undefined local variable or method `render_403' for #<Api::V2::ReportsController:0x007fcbd80ed5c0>

Added by Dominic Cleal about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
-
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

The "render_403" method isn't available from the API controller, only the UI controller. Now the smart proxy auth is called from the API reports controller, when smart proxy auth fails it calls this method and hits this error:

Started POST "/api/reports" for 127.0.0.1 at 2013-09-24 10:22:45 +0200
Processing by Api::V2::ReportsController#create as JSON
  Parameters: {"report"=>"[FILTERED]"}
Verifying request from ["localhost", "localhost.localdomain", "localhost4", "localhost4.localdomain4"] against []
No smart proxy server found on ["localhost", "localhost.localdomain", "localhost4", "localhost4.localdomain4"] and is not in trusted_puppetmaster_hosts
undefined local variable or method `render_403' for #<Api::V2::ReportsController:0x007fcbd80ed5c0> (NameError)
/home/dcleal/code/foreman/foreman/app/controllers/concerns/foreman/controller/smart_proxy_auth.rb:28:in `require_puppetmaster_or_login'

(regression)

Actions

Also available in: Atom PDF