How does one handle a lot of conditional rendering based on the permissions of the logged in user?

It kind of seems annoying to have check(user.permissions, Permissions.MANAGE_OTHER_USERS) for everything, especially when different permissions activate different UI elements.
2 Replies
r.omaarr
r.omaarr2y ago
I was looking into the same thing some time ago, https://isamatov.com/react-permissions-and-roles/ this helped me while building a SAAS B2B Dashboard for a client.
Web Development Tutorials - Iskander Samatov
Clean pattern for handling roles and permissions in large React apps
Manage granular roles and permissions in React applications in a clean and scalable way.
scinorandex
scinorandexOP2y ago
thanks, will take this into account
Want results from more Discord servers?
Add your server