Replies: 2 comments
-
Hail, @martincpt 👋 Welcome to Fief's kingdom! Our team will get back to you very soon to help. In the meantime, take a minute to star our repository ⭐️ Farewell! |
Beta Was this translation helpful? Give feedback.
-
Hi @martincpt 👋 Actually, roles are designed to help granting/revoking a set of permissions. It means that, roles are not meaningful by themselves, only the permissions they grant are. You can read more about them here: https://docs.fief.dev/configure/access-control/ That's why they do not appear in To check if a user has the right permissions, you can refer to this example: https://docs.fief.dev/integrate/python/fastapi/#checking-for-permissions |
Beta Was this translation helpful? Give feedback.
-
I'm playing with Fief via the FastAPI client and I'm wondering how should I check the roles of a user and why it is not part of the FiefUserInfo and FiefAccessTokenInfo classes.
What's the reason behind to leave out this very basic user attribute?
Moreover, the word "role" does not even appear in the fief_client module a single time.
Also, If we can only rely on user permissions, what would be the most "Fiefonic" way to check that user has at least one of the given permissions?
Thank you for your reply!
Beta Was this translation helpful? Give feedback.
All reactions