-
Notifications
You must be signed in to change notification settings - Fork 964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RBAC: Add hasRole to API #1730
Comments
Idea here is to move from
into a That way a |
Note this PR should also address the inconsistency in role vs roles in requireAuth. The params and docs should both use |
Do secure services kind of handle this? https://redwoodjs.com/docs/services#secure-services |
Currently we have
hasRole
method on the web side of things, but it would be neat having it on the api side. We currently haverequireAuth
, but that will throw an error whilehasRole
would most likely return a boolean.For now it's super easy to just add copy the
requireAuth
logic and change out the throwing of exceptions to boolean, but would be nice seeing a native way in future RedwoodJS versions./cc @dthyresson
The text was updated successfully, but these errors were encountered: