Actions
Bug #18338
closedMissing common error templates (incl. missing permission)
Status:
Closed
Priority:
Normal
Assignee:
Category:
Roles and Permissions
Target version:
Description
Hello,
in the main application controller we redirect to common/4xx views but these are not present causing the Rails app to crash with generic 500:
[lzap@lzapx katello]$ ag common/40 app/controllers/katello/application_controller.rb 299: format.html { render :template => "katello/common/403", :layout => !request.xhr?, :status => 403 } 313: format.html { render :template => "katello/common/404", :layout => !request.xhr?, :status => 404 } 360: render :template => 'katello/common/400', :layout => !request.xhr?, :status => status,
I experienced this with Satellite 6.2, if this is an easy fix, please file backport BZ, thanks.
2017-02-01 06:17:22 [app] [I] Started GET "/katello/403" for 10.40.204.143 at 2017-02-01 06:17:22 -0500 2017-02-01 06:17:22 [app] [I] Processing by Katello::ApplicationController#permission_denied as HTML 2017-02-01 06:17:22 [app] [I] Completed 500 Internal Server Error in 128ms 2017-02-01 06:17:22 [app] [F] | ActionView::MissingTemplate (Missing template katello/common/403 with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :rabl]}. Searched in: | * "/usr/share/foreman/app/views" | * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-0.3.0.13/app/views" | * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.5.3.18/app/views" | * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-5.0.0.9/app/views" | * "/opt/theforeman/tfm/root/usr/share/gems/gems/redhat_access-1.0.13/app/views" | * "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.95/app/views" | * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.11/app/views" | * "/opt/theforeman/tfm/root/usr/share/gems/gems/bastion-3.2.0.10/app/views" | * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk-6.1.0.3/app/views" | * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.11/app/views" | * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-0.1.38/app/views" | * "/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.3.6/app/views" | ): | katello (3.0.0.95) app/controllers/katello/application_controller.rb:290:in `block (2 levels) in render_403' | katello (3.0.0.95) app/controllers/katello/application_controller.rb:289:in `render_403' | app/controllers/application_controller.rb:61:in `deny_access' | app/controllers/application_controller.rb:53:in `authorize' | lib/middleware/catch_json_parse_errors.rb:9:in `call' |
Actions