Bug #10132
closed
User assigned 'viewer' role causes httpd 500 internal error when browsing Foreman UI
Added by J C over 9 years ago.
Updated over 6 years ago.
Description
I created a new user. Assigned the 'viewer' role. After login, browsing off the dashboard page causes the following:
2015-04-14 13:59:15 [I] Processing by DashboardController#index as HTML
2015-04-14 13:59:15 [I] Rendered dashboard/welcome.html.erb within layouts/application (18.0ms)
2015-04-14 13:59:15 [I] Rendered home/_user_dropdown.html.erb (3.0ms)
2015-04-14 13:59:15 [I] Read fragment views/tabs_and_title_records-4 (0.1ms)
2015-04-14 13:59:15 [I] Rendered home/_topbar.html.erb (168.0ms)
2015-04-14 13:59:15 [I] Rendered layouts/base.html.erb (170.6ms)
2015-04-14 13:59:15 [I] Filter chain halted as :welcome rendered or redirected
2015-04-14 13:59:15 [I] Completed 200 OK in 231ms (Views: 207.4ms | ActiveRecord: 4.2ms)
2015-04-14 13:59:19 [I] Processing by Katello::DashboardController#index as HTML
2015-04-14 13:59:19 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.0/app/views/katello/common/_helptip_button.html.haml (0.1ms)
2015-04-14 13:59:19 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.0/app/views/katello/common/_helptip.html.haml (0.0ms)
2015-04-14 13:59:19 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.0/app/views/katello/dashboard/index.html.haml within katello/layouts/katello (9.9ms)
2015-04-14 13:59:19 [I] Completed 500 Internal Server Error in 41ms
2015-04-14 13:59:19 [F]
NameError (undefined local variable or method `anonymous_admin' for #<User:0x0000000afeaf60>):
app/controllers/concerns/application_shared.rb:13:in `set_timezone'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
- Triaged changed from No to Yes
J C wrote:
I created a new user. Assigned the 'viewer' role. After login, browsing off the dashboard page causes the following:
2015-04-14 13:59:15 [I] Processing by DashboardController#index as HTML
2015-04-14 13:59:15 [I] Rendered dashboard/welcome.html.erb within layouts/application (18.0ms)
2015-04-14 13:59:15 [I] Rendered home/_user_dropdown.html.erb (3.0ms)
2015-04-14 13:59:15 [I] Read fragment views/tabs_and_title_records-4 (0.1ms)
2015-04-14 13:59:15 [I] Rendered home/_topbar.html.erb (168.0ms)
2015-04-14 13:59:15 [I] Rendered layouts/base.html.erb (170.6ms)
2015-04-14 13:59:15 [I] Filter chain halted as :welcome rendered or redirected
2015-04-14 13:59:15 [I] Completed 200 OK in 231ms (Views: 207.4ms | ActiveRecord: 4.2ms)
2015-04-14 13:59:19 [I] Processing by Katello::DashboardController#index as HTML
2015-04-14 13:59:19 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.0/app/views/katello/common/_helptip_button.html.haml (0.1ms)
2015-04-14 13:59:19 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.0/app/views/katello/common/_helptip.html.haml (0.0ms)
2015-04-14 13:59:19 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.0/app/views/katello/dashboard/index.html.haml within katello/layouts/katello (9.9ms)
2015-04-14 13:59:19 [I] Completed 500 Internal Server Error in 41ms
2015-04-14 13:59:19 [F]
NameError (undefined local variable or method `anonymous_admin' for #<User:0x0000000afeaf60>):
app/controllers/concerns/application_shared.rb:13:in `set_timezone'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
I think the upgrade I did just before was the cause. When I removed the updates, listed below, the new user operates as expected.
---> Package foreman-release.noarch 0:1.8.0-0.1.RC2.el6 will be updated
---> Package foreman-release.noarch 0:1.8.0-0.1.RC3.el6 will be an update
---> Package mod_passenger.x86_64 0:4.0.18-9.7.el6 will be updated
---> Package mod_passenger.x86_64 0:4.0.18-9.8.el6 will be an update
---> Package ruby193-rubygem-passenger.x86_64 0:4.0.18-9.7.el6 will be updated
---> Package ruby193-rubygem-passenger.x86_64 0:4.0.18-9.8.el6 will be an update
---> Package ruby193-rubygem-passenger-native.x86_64 0:4.0.18-9.7.el6 will be updated
---> Package ruby193-rubygem-passenger-native.x86_64 0:4.0.18-9.8.el6 will be an update
---> Package ruby193-rubygem-passenger-native-libs.x86_64 0:4.0.18-9.7.el6 will be updated
---> Package ruby193-rubygem-passenger-native-libs.x86_64 0:4.0.18-9.8.el6 will be an update
---> Package rubygem-passenger.x86_64 0:4.0.18-9.7.el6 will be updated
---> Package rubygem-passenger.x86_64 0:4.0.18-9.8.el6 will be an update
---> Package rubygem-passenger-native.x86_64 0:4.0.18-9.7.el6 will be updated
---> Package rubygem-passenger-native.x86_64 0:4.0.18-9.8.el6 will be an update
---> Package rubygem-passenger-native-libs.x86_64 0:4.0.18-9.7.el6 will be updated
---> Package rubygem-passenger-native-libs.x86_64 0:4.0.18-9.8.el6 will be an update
Perhaps we should close this, and I can open a new bug if needed (after more testing)?
OK, I got a similar message from another new user (with the 'manager' role) - still with the updates not applied.
2015-04-14 15:11:13 [I] Processing by Katello::DashboardController#index as HTML
2015-04-14 15:11:13 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.0/app/views/katello/common/_helptip_button.html.haml (0.1ms)
2015-04-14 15:11:13 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.0/app/views/katello/common/_helptip.html.haml (0.1ms)
2015-04-14 15:11:13 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.0/app/views/katello/dashboard/index.html.haml within katello/layouts/katello (17.3ms)
2015-04-14 15:11:13 [I] Completed 500 Internal Server Error in 92ms
2015-04-14 15:11:13 [F]
NameError (undefined local variable or method `anonymous_admin' for #<User:0x007f86acf58108>):
app/controllers/concerns/application_shared.rb:13:in `set_timezone'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/5176 added
- Pull request deleted (
)
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Bugzilla link set to 1199408
- Bugzilla link deleted (
1199408)
- Bugzilla link set to 1199408
Also available in: Atom
PDF