hi :wave:. is there a best practice for conditiona...
# help
b
hi 👋. is there a best practice for conditional rendering of UI, e.g. only show an edit button if the user has permission to edit? I couldn't find any docs on this. at first, we put some logic into the frontend, but we realized that we were essentially duplicating some derived role conditions. is it as simple as having an api endpoint that the frontend can use to reach cerbos to ask if the user has permission to edit?
d
Hi Brandon, Here’s a summary of a relevant GH discussion: • When your front-end app hits your backend to fetch the data, return the permissions so you can conditionally render UI components based on what the user can do. • A better solution is coming.
b
awesome, thank you!