Skip to content
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

PIMS-2107 Email Field Rework #2701

Merged
merged 15 commits into from
Oct 2, 2024
Merged

PIMS-2107 Email Field Rework #2701

merged 15 commits into from
Oct 2, 2024

Conversation

dbarkowsky
Copy link
Collaborator

@dbarkowsky dbarkowsky commented Sep 24, 2024

🎯 Summary

PIMS-2107

Changes

  • API now verifies emails when submitting an access request or updating a user.
  • Email field on the Access Request form is now only prepopulated and locked when it's an IDIR user
  • Non-IDIR users can enter emails of their choosing
  • Frontend uses Zod to validate the email to stay consistent with the backend.
  • User Details editing also has validation added.

Testing

  • Log in with IDIR and BCSC user. See how email field is restricted or not
  • Try entering a bad email and submitting
  • Try entering a good email and submitting

🔰 Checklist

  • I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation where required.
  • I have tested my changes to the best of my ability.
  • My changes generate no new warnings.

Copy link

🚀 Deployment Information

The Express API Image has been built with the tag: 2701. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the API deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link

codeclimate bot commented Sep 24, 2024

Code Climate has analyzed commit 4ffdabf and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 93.3%.

View more on Code Climate.

Copy link

🚀 Deployment Information

The React APP Image has been built with the tag: 2701. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the APP deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link
Collaborator

@LawrenceLau2020 LawrenceLau2020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested logging in using one of the test accounts, on first try it actually logged me in bypassing the access request page for some reason, although I didn't see any menu items.

Trying the second time after logging out, then got the access request page. The email address was required and I entered a false email, then when approving the new test user I saw that it stored the test user's actual email address from the BCSC service.

@TaylorFries
Copy link
Collaborator

TaylorFries commented Sep 26, 2024

EDIT: didnt see lawrence's comment above essentially the blow is just the same comment

interesting thing while testing. I entered my email with the dev bceid account and it seems that it still pulled the email associated with the account to be used.
Screenshot 2024-09-26 at 8 45 07 AM
Screenshot 2024-09-26 at 8 44 43 AM

@LawrenceLau2020
Copy link
Collaborator

After this commit: 1da6719, I'm now able to enter any email address when creating an access request as a BSCS user, and the entered email gets stored properly in the user table.

Copy link
Collaborator

@TaylorFries TaylorFries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all changes work as expected.

@dbarkowsky dbarkowsky merged commit 5d3fef1 into main Oct 2, 2024
12 checks passed
@dbarkowsky dbarkowsky deleted the PIMS-2107-Email-Field-Rework branch October 2, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants