-
Notifications
You must be signed in to change notification settings - Fork 48
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
Jerry - email verification admin accounts #1446
Jerry - email verification admin accounts #1446
Conversation
Conditionally render betaEmail and betaPassword input fields if role is "Administrator"
Added formErrors for Actual Email and Password inputs to better show the user to address the problem there.
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.
Hi @jerryren527 I tested this PR with BE PR#582 and they both work as intended.
Uploading createUserAdmin.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.
Hello, @jerryren527! I tested your PR along with the related BE and it works as expected! Great implementation!
-
Checked into the current branches, logged in as Owner, navigated to
Other Links -> User Management
and tested theCreate New User
functionality by attempting to create an user with an Administrator user role. -
The actual email and actual password fields validate the input properly and do not allow me to create an user with an Administrator user role if either the actual email or the actual password is incorrect.
-
The error messages displayed are as expected.
-
Verified in the database if the actual email field is reflected for the newly created user with the Administrator user role.
Testing Video:
1446.+.582.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.
Hi @jerryren527, everything looks good to me in this PR. I was only able to create an admin account when correct actual HGN main credentials were provided. Confirmed in the DB as well. Loved the implementation. Great job!
Test rec:
27.10.2023_22.50.19_REC.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.
Hey @jerryren527 I've tested both of your PRs, and they worked as expected. Nice work!
After logging in as an admin, I tested the 'Create New User' feature, and here are the results:
- Successfully created a new Volunteer user without providing actual HGN account credentials
- Creating an Admin user with correct credentials will succeed; otherwise, error messages will appear in the top-right corner
FE.1446+BE.582.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.
It worked as intended. Nice!
pr.review.1446.mp4
Thank you all, moving to final review. |
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.
Good job on the functionality @jerryren527 ! The code looks good
1446-582.mp4
Thank you all, merging! |
Description
The main motivation of this PR is to require an actual email and password associated with a real volunteer in the Main HGN app whenever creating an Administrator or Owner account in the Dev environment. This is a security measure to provide an identity, in the form of a real email address, to otherwise anonymous Administrator and Owner accounts in the Dev environment.
Related PRS (if any):
Main changes explained:
How to test:
npm install
and...
to run this PR locallyScreenshots or videos of changes:
admin.accounts.need.email.validation.demo.mp4
Note:
Please try creating users of other roles as well to see if that breaks the app. Thanks!