Add institutional email verification feature#2295
Draft
bendichter wants to merge 7 commits intomasterfrom
Draft
Conversation
There was a problem hiding this comment.
Copilot reviewed 9 out of 11 changed files in this pull request and generated 2 comments.
Files not reviewed (2)
- dandiapi/api/templates/api/account/questionnaire_form.html: Language not supported
- dandiapi/api/templates/api/mail/verification_email.txt: Language not supported
Comments suppressed due to low confidence (1)
dandiapi/api/models/user.py:21
- The institutional_email field defaults to an empty string while the migration allows null; aligning these settings can prevent potential inconsistencies.
institutional_email = models.EmailField(blank=True, default='')
Resolve conflicts in views/__init__.py, views/auth.py, and urls.py. Renumber migration from 0019 to 0031 to follow latest master. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Invalidate verification token after successful use - Don't assign default UUID tokens to all UserMetadata rows - Reject verification if token_created timestamp is missing - Fix for...break anti-pattern, use .first() instead - Fix broken HTML indentation in questionnaire form - Simplify redundant PENDING status branches - Add tests for email verification flow Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extract _process_new_registration helper to fix C901 complexity lint - Create shared AUTO_APPROVE_EMAIL_SUFFIXES constant used for both GitHub email auto-approve and institutional email verification - Update form label to reflect all accepted institutional email domains Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Users whose GitHub email matches the auto-approve list should not receive a redundant institutional email verification. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove @nih.gov from AUTO_APPROVE_EMAIL_SUFFIXES (already covered by .gov) - Add contact instructions to verification email for expired links - Move uuid import to module level in tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #1967
Cline-assisted