-
Notifications
You must be signed in to change notification settings - Fork 129
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
isAdmin and isAuthRecord return false #323
Comments
Oh, it seems that I've forgotten to update them. I'll push a fix in the JS SDK a little bit later. |
ganigeorgiev
added a commit
that referenced
this issue
Nov 29, 2024
ganigeorgiev
added a commit
that referenced
this issue
Nov 29, 2024
ganigeorgiev
added a commit
that referenced
this issue
Nov 29, 2024
I've pushed a "fix" in v0.22.1. |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Both
pb.authStore.isAdmin
andpb.authStore.isAuthRecord
return false. It seems thatgetTokenPayload(token).type
value refers now to the token type ("auth", etc.) while still being compared to a record type string ("admin" or "authRecord").Because the default users collection id is pb_users_auth, i explored the possibility to use
getTokenPayload(token).collectionId
instead with something likeincludes()
method but newly created auth collections have the same id format (pbc_0123456789) as the _superusers collection.Note:
isAdmin
may should beisSuperuser
for consistency.The text was updated successfully, but these errors were encountered: