Skip to content

Add institutional email verification feature#2295

Draft
bendichter wants to merge 7 commits intomasterfrom
verify-uni-address
Draft

Add institutional email verification feature#2295
bendichter wants to merge 7 commits intomasterfrom
verify-uni-address

Conversation

@bendichter
Copy link
Copy Markdown
Member

fix #1967

Cline-assisted

@bendichter bendichter requested a review from Copilot April 8, 2025 20:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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='')

@waxlamp waxlamp self-assigned this Dec 29, 2025
bendichter and others added 6 commits March 24, 2026 21:57
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

include institution email on registration

4 participants