-
Notifications
You must be signed in to change notification settings - Fork 25
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
Yongjian - Update message for inactive user account after login #438
Yongjian - Update message for inactive user account after login #438
Conversation
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.
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.
Hello ypan710, However, I did receive one error when attempting to login as both an admin and a volunteer. See screenshot. Error Received
|
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.
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.
Hello @ypan710 !
Great work = D
The Pr's works as intended.
Inactive user on dashboard user manager
If I try to access with the user, I receive the message.
The code looks well 🚀
Please request a change rather than approve something like this. |
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.
Local testing of this branch confirms
- the updated error message is displayed to a user attempting to login with an "inactive" account.
- the error message is displayed regardless of the value entered in the Password input (unless no value is entered, in which case a validation error is displayed).
- an error with code 403 is returned from the backend and logged to the frontend console.
Errors
The following error is logged to the backend console each time a login request for an inactive user is sent: Cannot set headers after they are sent to the client
- the error does not occur when invoking the "Invalid password" error for an active user in the same
if/else
block.
Testing Video:
438-be-demo.mov
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.
Confirmed that the Cannot set headers after they are sent to the client
error has been fixed. Nice job!
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.
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.
I have reviewed your code and test it, it looks good.
253656739-46e301de-a751-4f8c-bd3b-48cbacfeb305.-.01.mp4
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.
Hello @ypan710 the functionality works as expected.
PR-438.mp4
No errors on the console as well .
Approving the PR on the same note
Thank you all, this one is low risk, merged! Thanks for all your excellent reviews! |
Description
Main changes explained:
Display the message "Sorry, this account is no longer active. If you feel this is in error, please contact your Manager and/or Administrator." if the user exists in the database but his or her profile is not active.
How to test:
npm run build
andnpm start
from the backendnpm run start:local
to run the frontendScreenshots