-
Notifications
You must be signed in to change notification settings - Fork 6
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
UserContextValues's userRole in App now uses backend api to get user's role #164
Conversation
Deploy preview for hknucsd-portal-dev ready! Built with commit e1bf9a0 |
Lmao since this needs the auth page refresh bug fix + legit test accounts the cypress literally cannot pass : ( |
Or well it needs the TODOs that I put in as comments at least. I left the TODOs there bc I thouht you'd have to do smth like that for the auth page refresh bug fix @godwinpang. Let me know if that is or isn't the case. If it isn't, I'll do the TODOs myself. |
// TODO: Add ApiConfigStore.setToken(token || '') here so getUserRole() works | ||
|
||
const id = parseInt(claims.user_id, 10); | ||
const userRole = await getUserRole(id); |
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.
don't await on both here - make them promises and do a promise.all - i want both awaits to go out together
…s role. It used to get the roles from firebase custom claims.
2f90db0
to
591a7cb
Compare
…s role (#164) * UserContextValues's userRole in App now uses backend api to get user's role. It used to get the roles from firebase custom claims. * Add fixes. * Remove unused function. Co-authored-by: gypang <[email protected]>
It used to get the roles from firebase custom claims.