-
Notifications
You must be signed in to change notification settings - Fork 0
Scrum 307 backend make email case insensitive #203
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
base: dev
Are you sure you want to change the base?
Conversation
bernhaaard
commented
Jun 19, 2025
- uses transforms at dto layer to transform all incoming emails and ensure they are lowercase
…plementaiton (SCRUM-210) (#197) Co-authored-by: jb-cc <115902941+jb-cc@users.noreply.github.com>
Co-authored-by: jb-cc <115902941+jb-cc@users.noreply.github.com>
9dd1e3f to
6451f31
Compare
Mohammed87FS
left a comment
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.
well done
6451f31 to
ea0d9d2
Compare
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.
Pull Request Overview
This PR ensures that all incoming email addresses are normalized to lowercase to enforce case-insensitivity.
- Updated test cases to expect lowercase emails.
- Added Transform decorators in DTOs using a dedicated normalizeEmail utility.
- Modified the registration strategy to lowercase the email from payload.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| backend/src/modules/users/users.service.spec.ts | Updated mock emails in service tests to be all lowercase. |
| backend/src/modules/users/users.repository.spec.ts | Updated mock emails and search queries in repository tests to be all lowercase. |
| backend/src/modules/users/dto/update-user.dto.ts | Added Transform decorator on the email property to normalize the email. |
| backend/src/modules/users/dto/create-user.dto.ts | Added Transform decorator on the email property to normalize the email. |
| backend/src/modules/requests/supervision/dto/create-supervision-request.dto.ts | Added Transform decorator on the email property to normalize the email. |
| backend/src/modules/auth/strategies/clerk-registration.strategy.ts | Applied toLowerCase directly on the payload email during registration. |
| backend/src/modules/admin/dto/supervisors-bulk-import.dto.ts | Added Transform decorator on the email property in the Supervisor DTO. |
| backend/src/modules/admin/dto/create-admin.dto.ts | Added Transform decorator on the email property to normalize the email. |
| backend/src/common/utils/email-utils.ts | Added a new utility function to convert emails to lowercase. |
ea0d9d2 to
519a7eb
Compare
jb-cc
left a comment
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.
The merge-base changed after approval.


