Bug 741499 - stacktrace when loading (reloading?) page where rights have been removed.
Summary: stacktrace when loading (reloading?) page where rights have been removed.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
low
low vote
Target Milestone: Unspecified
Assignee: Partha Aji
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-27 04:12 UTC by Corey Welton
Modified: 2019-09-26 13:21 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 20:54:52 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Corey Welton 2011-09-27 04:12:26 UTC
Description of problem:
If a user is on a page and rights have subsequently been removed, reloading the page throws a stacktrace, rather than cleanly displaying a permission denied page.
Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.  Create a user, "aaa"
2.  Create a role granting All Organization permissions; add "aaa" user to this role
3.  In a separate browser, login with user "aaa" and go to Organizations page
4.  In the original browser (as admin), revoke all rights from user "aaa" in the UI
5.  Attempt to reload the Orgs page with user "aaa"  

Actual results:

ArgumentError in Organizations#index

Showing /usr/share/katello/app/views/layouts/katello.haml where line #41 raised:

Invalid level specified or item key not found

Extracted source (around line #41):

38:     - else
39:       #subheader.container_16
40:         %nav.tab_nav
41:           = render_navigation(:expand_all => true, :level => 1)
42:       #maincontent.container_16
43:         %nav.subnav.container_16
44:           = render_navigation(:expand_all => true, :level => 2..3)

Rails.root: /usr/share/katello
Application Trace | Framework Trace | Full Trace

app/views/layouts/katello.haml:41:in `_app_views_layouts_katello_haml___153095593_70252241594080_0'
app/controllers/application_controller.rb:263:in `render_403'
app/controllers/application_controller.rb:262:in `render_403'
app/controllers/application_controller.rb:52:in `__bind_1317096489_494834'
app/controllers/application_controller.rb:460:in `call'
app/controllers/application_controller.rb:460:in `execute_rescue'
app/controllers/application_controller.rb:52:in `__bind_1317096489_494834'

Request

Parameters:

None

Show session dump

Show env dump
Response

Headers:

None

Expected results:
Cleanly handle the permission denied request

Additional info:

Comment 1 Mike McCune 2012-01-26 19:38:11 UTC
mass move to CFSE product.

Comment 2 Partha Aji 2012-02-10 01:42:35 UTC
More cases for this bug
1) User has access to Orgs A,B, C and C is its current org.  Admin revokes access to org C from the user. User when he clicks on any page will automatically be logged out with a message stating
"""
You current organization is no longer valid. It is possible that either the     
organization has been deleted or your permissions revoked, please log back in to
continue                                                                        .
"""

2) User has access to no orgs. Admin then provides access to orgs A, B. The user should immediately get assigned to org A just as he would reload or click any page.

Comment 5 Corey Welton 2012-02-21 16:45:10 UTC
QA Verified.


Note You need to log in before you can comment on or make changes to this bug.