integr8ly / tutorial-web-app

Solution Explorer provides the front door into the Integreatly initiative. It hosts the various Solution Patterns, as well as providing a dashboard of installed applications/products/services.
Apache License 2.0
36 stars 54 forks source link

INTLY-6829: Create a flag/method to determine user role #579

Closed mfrances17 closed 4 years ago

mfrances17 commented 4 years ago

Motivation

https://issues.redhat.com/browse/INTLY-6829

What

Add a localstorage value that checks if a user has admin privileges, based on if they belong to an admin group.

Why

We need to change the UI and behavior of the solution explorer based on if the user has admin privileges.

Checklist:

Progress

Additional Notes

For testing, you can point your server to my docker image at: docker.io/mfrances17/dev-tutorial-web-app:latest

Or check it out on this server, it's currently installed on it but will be taken down at some point: https://tutorial-web-app-redhat-rhmi-solution-explorer.apps.uxd.cloudservices.rhmw.io/

It's not implemented anywhere just yet since this PR just covers the resource itself, but you should be able to set a breakpoint in the UI to check the value of window.localStorage.currentUserIsAdmin.