Bug 1467146

Summary: Unable to view Reports if a member has a custom Role - indefinite spinning wheel
Product: Red Hat CloudForms Management Engine Reporter: tachoi
Component: UI - OPSAssignee: Martin Hradil <mhradil>
Status: CLOSED CURRENTRELEASE QA Contact: Niyaz Akhtar Ansari <nansari>
Severity: high Docs Contact:
Priority: urgent    
Version: 5.8.0CC: adhingra, cpelland, fdewaley, hkataria, jhardy, mpovolny, nansari, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: spinner:rbac:report
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1468336 (view as bug list) Environment:
Last Closed: 2018-03-06 14:35:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1468336    
Attachments:
Description Flags
custom role
none
spinning wheel view none

Description tachoi 2017-07-03 04:35:34 UTC
Created attachment 1293727 [details]
custom role

Description of problem:
Having different Roles for our customers. However when we give them view permission to Reports, they are just getting a loading with "Spinning wheel" indefinitely.

Version-Release number of selected component (if applicable):
CFME 5.8.0.17

How reproducible:

Steps to Reproduce:
1.Create Custom Role with attached screenshot permission list
2.Create Custom group with assigning this Custom Role
3.Create new user with assigning this custom group
4.Login with new created user and navigate to built-in reports accordion

Actual results:
Only see spinning wheel indefinitely

Expected results:
Navigate Reports menu based on permission

Additional info:
Able to observe "ERROR -- : An unauthorized connection attempt was rejected" from production.log

Comment 3 tachoi 2017-07-03 04:46:09 UTC
Created attachment 1293729 [details]
spinning wheel view

Comment 7 CFME Bot 2017-07-06 16:28:45 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/5d36640dacc79b2aa3ac3978ddc34de37d74575c

commit 5d36640dacc79b2aa3ac3978ddc34de37d74575c
Author:     Martin Hradil <mhradil>
AuthorDate: Thu Jul 6 15:37:08 2017 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Thu Jul 6 15:37:08 2017 +0000

    Don't x_node_set on a tree which doesn't exist
    
    Calling `x_node_set` when a tree doesn't exist works, but actually creates the entry that `tree_exists?` checks to see if such a tree exists.
    
    When the user doesn't have the right to see such a tree, that's problematic, since it breaks the assumption that `tree_exists?` returns true only for trees that were actually initialized.
    
    The leads to the calling `lock_tree` on a nonexistent tree, leading to a JS exceptions ("No element has been found").
    
    This makes us actually check if the tree already exists before calling `x_node_set` on it.
    
    (Would prefer to fix `x_node_set` instead, but.. this is a bugfix, and I really don't want to introduce more bugs. :))
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1467146

 app/controllers/report_controller.rb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comment 10 Niyaz Akhtar Ansari 2017-11-06 09:03:37 UTC
Verified in Version 5.9.0.5