Bug 1278741 - Dashboards are not displayed if a user only has "view" permission on dashboards
Summary: Dashboards are not displayed if a user only has "view" permission on dashboards
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.4.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.5.0
Assignee: Libor Pichler
QA Contact: Milan Falešník
URL:
Whiteboard:
Depends On:
Blocks: 1281850
TreeView+ depends on / blocked
 
Reported: 2015-11-06 10:39 UTC by Felix Dewaleyne
Modified: 2019-09-12 09:14 UTC (History)
9 users (show)

Fixed In Version: 5.5.0.8
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1281850 (view as bug list)
Environment:
Last Closed: 2015-12-08 13:45:05 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2043853 0 None None None Never
Red Hat Product Errata RHSA-2015:2551 0 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 17:58:09 UTC

Description Felix Dewaleyne 2015-11-06 10:39:22 UTC
Description of problem:
Dashboards are not displayed if a user only has "view" permission on dashboards

Version-Release number of selected component (if applicable):
5.4.2.0 and 5.4.3.1

How reproducible:
all the time

Steps to Reproduce:
1.create a role that only is able to "view" dashboards
2.log in as user that uses that role

Actual results:
There is no attempt to render any widget for the user, the page remains blank


Expected results:
the widgets, even if they are the default selection for the user, are displayed

Additional info:
adding any of the modify permission to the role allows the user to see all the widgets, but removing the permissions and going back to "view" only returns it to the previous state.

Comment 2 Libor Pichler 2015-11-09 17:36:32 UTC
Hi Felix,
I was unable to recreate this. 
I was able to see dashboard's widgets when I have only 'view' permissions for my user.

Can please confirm this in latest ?

Thank you!

Comment 3 Felix Dewaleyne 2015-11-10 16:46:15 UTC
that test was ran  on 5.4.2.0-1 in the lab with the db of the customer imported - I thought I had upgraded it. Unfortunately I had attached it to the wrong channel for the upgrade... After upgrading to 5.4.3.1 correctly the system, I however still notice the same issue

to reproduce with this system :

- log in as "admin / smartvm" 
- go to configure > configuration > ACL
- find "Amadeus-dashboard-2" in the roles. I've set it to the same as the customer's example.
- log out and in as "cftest / smartvm"

you should be able to see the problem. if you log out and back as "admin / smartvm" and add to the role any of the modify permissions, it starts displaying the dialogs.

Comment 6 CFME Bot 2015-11-12 20:20:28 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=360519969c02314f4308f7bfffe68afb7ac6aeb6

commit 360519969c02314f4308f7bfffe68afb7ac6aeb6
Author:     Libor Pichler <lpichler>
AuthorDate: Thu Nov 12 15:06:27 2015 +0100
Commit:     Libor Pichler <lpichler>
CommitDate: Thu Nov 12 15:06:27 2015 +0100

    Allow to display dashboard widgets if user has only view permission for it
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1278741
    This was fixed by https://github.com/ManageIQ/manageiq/pull/4853
    concretely by commit f7fe90b5f65ead91be34f19c2308f64a5fdb7cbf
    Cherry pick was not possible but fixed in similar way.
    Condition if @widgets_menu_xml is only for dropdown for adding and
    reseting widgets on dashboard page, so I separated it from rendering widgets.

 vmdb/app/views/dashboard/show.html.haml | 38 ++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 19 deletions(-)

Comment 7 CFME Bot 2015-11-12 20:20:34 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=1e205d4e73ab9794c90ca9eaf0ff19326648b219

commit 1e205d4e73ab9794c90ca9eaf0ff19326648b219
Merge: a7438eb 3605199
Author:     Dan Clarizio <dclarizi>
AuthorDate: Thu Nov 12 12:18:12 2015 -0500
Commit:     Dan Clarizio <dclarizi>
CommitDate: Thu Nov 12 12:18:12 2015 -0500

    Merge branch 'bz_1278741' into '5.4.z'
    
    Allow to display dashboard widgets if user has only view permission for it
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1278741
    This was fixed by https://github.com/ManageIQ/manageiq/pull/4853
    concretely by commit f7fe90b5f65ead91be34f19c2308f64a5fdb7cbf
    Cherry pick was not possible but fixed in similar way.
    Condition if @widgets_menu_xml is only for dropdown for adding and
    reseting widgets on dashboard page, so I separated it from rendering widgets.
    
    See merge request !423

 vmdb/app/views/dashboard/show.html.haml | 38 ++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 19 deletions(-)

Comment 8 Milan Falešník 2015-11-19 10:35:59 UTC
Verified in 5.5.0.11 against 5.4.3.1

Comment 10 errata-xmlrpc 2015-12-08 13:45:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2551


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