AAI-386: Restrict user registration to a restricted list of domains [SBP]#82
Conversation
There was a problem hiding this comment.
Pull Request Overview
Implements email domain validation for SBP user registration to restrict registration to approved institutional domains.
- Added domain validation logic to check email addresses against an allowed list
- Added configuration for approved institutional domains (UNSW, BioCommons, USyd, WEHI, Monash, Griffith, UoM)
- Updated tests to use approved domains and validate the new restriction functionality
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| config.py | Adds list of approved email domains for SBP registration |
| routers/sbp_register.py | Implements email domain validation with rejection logic |
| tests/test_sbp_register.py | Updates test data and adds validation tests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
marius-mather
left a comment
There was a problem hiding this comment.
A few minor comments, but please use an existing email parser like email-validator to extract the domain - email addresses can have all kinds of weirdness, better to use a library that already handles all of it.
…ved error handling and testing
5dc6a0b to
20494d2
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
marius-mather
left a comment
There was a problem hiding this comment.
Looks good, thanks
Description
AAI-386: Restrict user registration to a restricted list of domains [SBP]
Changes
Checklist