-
-
Notifications
You must be signed in to change notification settings - Fork 892
feat: add ability to return missing perms #2238
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
base: main
Are you sure you want to change the base?
Conversation
Review this PR on mrge.io |
@rxri is attempting to deploy a commit to the better-auth Team on Vercel. A member of the Team first needs to authorize it. |
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mrge found 11 issues. View them in mrge.io
btw I think this should also be added to |
@Bekacru had any chance to look at this? Since you said you may have different idea for it ^^ I also added |
If api key or user would have no permissions at all, the statements would be `null` or `undefined` leading to `authorize` function not returning anything at all. We need to check if `statements` is null/undefined and assign empty object so function can run properly and return missing permissions
Cool idea. |
Bug Report
Comments? Email us. |
server only endpoint tho ^ |
need some opinion about it
that would be a great feature for developers that wanna return the missing permissions or just see in the code themselves
all 8000 tests (existing & new ones) pass after modifying
authorize
fnfunctions are backwards compatible (if
returnMissingPermissions
is false or undefined` they will return boolean)