Dynamic UI (workspaces + dashboard lists) in React...
# gooddata-ui
Dynamic UI (workspaces + dashboard lists) in React Hi, we are integrating GD into a ReactJS app. We use Auth0 with JIT prov. We are building a multi-tenant SaaS app which uses GD as the BI layer. The flow we want to implement is as follows, to mimic GD main UI, but with more control. • user hits the homepage. • user logs in if needed via Auth0 and get to homepage, this time authenticated • user sees a dropdown of the workspaces it is allowed to access • on selecting a workspace, user sees a list of dashboards it is allowed to access • on selecting a dashboard, page loads the relevant dashboard embedded by React. The key here is to keep this dynamic. Each user, depending on their permissions will see a different set of [workspaces,dashboards] so this has to come from the API layer, asking GD “I’m Joe, my uid is xyz , give me a list of the things I have access to”. How do you suggest we approach this?
Hi Romain, Most of the implementation would be on your side. However, the main flow which you’re describing should be as following: • Based on the user ID, use
to obtain workspace permissions and display a list of accessible workspaces from that. • Using the workspace ID, call
to get user identifiers. For user IDs that match the user identifier in the response, display the accessible dashboards. • Upon clicking on a Dashboard ID, load the Dashboard component with the corresponding Dashboard ID. Of course, as was mentioned, the whole react logic would need to be implemented from your end.
thanks a lot, super helpful