Get user permissions in React SDK

I’m using the React SDK. I want to show or hide a link to an admin portal if the user has the permission adminportal:view. This seems like an incredibly basic thing to do but I’m unable to do it or find any code to do it online. I have no issues getting some of the user data like name, picture, etc. but I can’t get roles, permissions, or metadata. Any help would be greatly appericated.

Hey there!

Maybe that will be helpful: