Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BZ#1589409 - Support for disabling Dashboard #1446

Merged
merged 2 commits into from
Jun 20, 2018
Merged

BZ#1589409 - Support for disabling Dashboard #1446

merged 2 commits into from
Jun 20, 2018

Conversation

chalettu
Copy link
Contributor

@chalettu chalettu commented Jun 19, 2018

@miq-bot add_label bug
@miq-bot add_label gaprindashvili/yes

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1589409

@chalettu
Copy link
Contributor Author

Screenshot of what it looks like if you don't have access to the Dashboard.
demo_screenshot

@AllenBW
Copy link
Member

AllenBW commented Jun 19, 2018

@AllenBW AllenBW self-assigned this Jun 19, 2018
@serenamarie125
Copy link

I'm not sure of the RBAC model for the SUI, but I wonder if utilizing something like this might make more sense than only handling a single use case:

  • if user access to 1 or more of the nav items, navigate to the first navigation item by default
  • if user access to none of the nav items, don't let them in ( i think we previously handled this case )

@chalettu @AllenBW @Loicavenel @ohadlevy thoughts?

@chalettu
Copy link
Contributor Author

We could set it up to go down the list of menu items and pick the first one that the user has access to. I am not really sure what would be best from what we feel are requirements but let me know what you all think would be the best user experience

@serenamarie125
Copy link

I think that makes sense @chalettu but you should def get the 👍from either Ohad or Loic first!

@AllenBW
Copy link
Member

AllenBW commented Jun 19, 2018

Oh oh yeah so if a user can view say, the service catalog, and ONLY the service catalog, thats the page they should be pushed to 😋

@serenamarie125
Copy link

yes sir @AllenBW that would be my recommendation

@miq-bot
Copy link
Member

miq-bot commented Jun 19, 2018

Checked commits https://github.com/chalettu/manageiq-ui-service/compare/002cf5c8e057f2a464c50897b494a9104ddddc1c~...9d18ce79cb7051f7ba14a353ef2fc627a7126775 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 🍰

@chalettu
Copy link
Contributor Author

Updated the logic to go down the list of pages a user has access to and pick the firsts one they can access and sends them there . So if a person tries to go to a page they do not have access to, they will be redirected to the first menu item they do have access to.

@AllenBW
Copy link
Member

AllenBW commented Jun 20, 2018

So I jumped in with a few users, ones that only had the service catalog role enabled then my orders enabled, the role looking a lil like this...

screen shot 2018-06-20 at 8 07 08 am

And for both users, when attempting to login, ended up with this...
screen shot 2018-06-20 at 8 07 52 am

@chalettu
Copy link
Contributor Author

@AllenBW , I tried reproducing the error you are seeing with the role you had pictured above and can't seem to reproduce it. Did you close your browser out and try fresh after saving the role changes? We cache permissions so if you didnt log out first of SUI, sometimes it causes weird things to happen.

@AllenBW
Copy link
Member

AllenBW commented Jun 20, 2018

@chalettu yeah tried it across a number of browsers, bounced the miq instance between changes, same result. Gonna do a box bounce and see if that changes anything 🤷‍♂️

Ooooooo well there we go, testing a bit more, will approve in a bit

Copy link
Member

@AllenBW AllenBW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is workin' jusssssstttttttt fineeeeeeeeeeee, furthermore as expected 👍

screen shot 2018-06-20 at 11 20 43 am

screen shot 2018-06-20 at 11 19 16 am

screen shot 2018-06-20 at 11 18 42 am

@AllenBW AllenBW merged commit ae38582 into ManageIQ:master Jun 20, 2018
simaishi pushed a commit that referenced this pull request Jul 11, 2018
BZ#1589409 - Support for disabling Dashboard
(cherry picked from commit ae38582)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1595454
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit 307c96833fe66b7bfccb66ea7ced8c767182b412
Author: Allen Wight <allen.b.wight@gmail.com>
Date:   Wed Jun 20 11:27:49 2018 -0400

    Merge pull request #1446 from chalettu/dashboard-permissions
    
    BZ#1589409 - Support for disabling Dashboard
    (cherry picked from commit ae385823137b78b78b1ea6b8abdee77b0b9b2ac4)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1595454

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants