p2-inc / idp-wizard

Identity Provider setup wizards for Keycloak
https://phasetwo.io
Other
1 stars 1 forks source link

Menu visibility based on permissions #146

Closed xgp closed 1 year ago

xgp commented 1 year ago

image

Visibility of menu items should be based on permissions.

pnzrr commented 1 year ago

For Dashboard there are two checks: featureFlags?.enableDashboard !== false || !hasOrgAccess,

My thoughts were if the featureFlag disables view, but you still have org access, you should see it. If you don't have org access and the dash is disabled, then it shouldn't show.

pnzrr commented 1 year ago

For Switch Organization, I added something to make the menu item only show when you have more than 1 org OR you have the right Realm roles. That way even if you only have 1 realm role you can still see the switcher to see "Global". Let me know if I got that right.