Project

General

Profile

Actions

Bug #18338

closed

Missing common error templates (incl. missing permission)

Added by Lukas Zapletal over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Roles and Permissions
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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'
 | 

Related issues 1 (0 open1 closed)

Related to Foreman - Feature #12754: Print the required permission on 403 pageClosedMarek Hulán12/09/2015Actions
Actions #1

Updated by Lukas Zapletal over 7 years ago

  • Related to Feature #12754: Print the required permission on 403 page added
Actions #2

Updated by Lukas Zapletal over 7 years ago

  • Subject changed from Missing common error templates to Missing common error templates (incl. missing permission)
  • Priority changed from Normal to High
  • Bugzilla link set to 1418269

When implementing this and you decide not to use Foreman core error pages, please render missing permission for 403 errors, this is very important. Users struggle finding correct permissions and Foreman core 403 page already shows that. See #12754 for more details.

I am setting high priority and associating Satellite 6.2 BZ with this, this is low effort - high impact - better user experience.

Actions #3

Updated by Justin Sherrill over 7 years ago

  • Translation missing: en.field_release set to 114
Actions #4

Updated by Justin Sherrill about 7 years ago

  • Assignee set to Justin Sherrill
  • Target version set to 202
Actions #5

Updated by The Foreman Bot about 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6857 added
Actions #6

Updated by Brad Buckingham about 7 years ago

  • Target version changed from 202 to 205
Actions #7

Updated by Justin Sherrill about 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #8

Updated by Eric Helms about 7 years ago

  • Translation missing: en.field_release deleted (114)
Actions #9

Updated by Justin Sherrill about 7 years ago

  • Priority changed from High to Normal
  • Translation missing: en.field_release set to 281
Actions

Also available in: Atom PDF