Bug 1278741 - Dashboards are not displayed if a user only has "view" permission on dashboards
Dashboards are not displayed if a user only has "view" permission on dashboards
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS (Show other bugs)
5.4.0
All All
high Severity high
: GA
: 5.5.0
Assigned To: Libor Pichler
Milan Falešník
:
Depends On:
Blocks: 1281850
  Show dependency treegraph
 
Reported: 2015-11-06 05:39 EST by Felix Dewaleyne
Modified: 2015-12-08 08:45 EST (History)
9 users (show)

See Also:
Fixed In Version: 5.5.0.8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1281850 (view as bug list)
Environment:
Last Closed: 2015-12-08 08:45:05 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2043853 None None None Never

  None (edit)
Description Felix Dewaleyne 2015-11-06 05:39:22 EST
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 12:36:32 EST
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 11:46:15 EST
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 15:20:28 EST
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@redhat.com>
AuthorDate: Thu Nov 12 15:06:27 2015 +0100
Commit:     Libor Pichler <lpichler@redhat.com>
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 15:20:34 EST
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@redhat.com>
AuthorDate: Thu Nov 12 12:18:12 2015 -0500
Commit:     Dan Clarizio <dclarizi@redhat.com>
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 05:35:59 EST
Verified in 5.5.0.11 against 5.4.3.1
Comment 10 errata-xmlrpc 2015-12-08 08:45:05 EST
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.