How can I check a user's roles and permissions?
15 views
1 answers
Asked 5/11/2025
What's the best way to check a logged-in user's roles and permissions using the Authava client?
Anon User 7
asked 5/11/2025
1 Answer
Accepted Answer
The Authava client provides convenient helpers for this:
authava.hasRoles("admin") // or ["admin", "editor"]
authava.hasPermissions("create.user")
These methods will check the current session's user.roles and user.permissions arrays and return true or false accordingly.
Ryan Hein
answered 5/11/2025
Your Answer
You need to be logged in to answer this question.
Sign in to Answer