ENG-3261: close re-invite validation gap and null-email modal render#7963
Open
nreyes-dev wants to merge 3 commits intomainfrom
Open
ENG-3261: close re-invite validation gap and null-email modal render#7963nreyes-dev wants to merge 3 commits intomainfrom
nreyes-dev wants to merge 3 commits intomainfrom
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7963 +/- ##
=======================================
Coverage 85.04% 85.04%
=======================================
Files 631 631
Lines 41203 41201 -2
Branches 4806 4805 -1
=======================================
- Hits 35040 35039 -1
Misses 5071 5071
+ Partials 1092 1091 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
/code-review |
kruulik
approved these changes
Apr 22, 2026
Contributor
kruulik
left a comment
There was a problem hiding this comment.
UI portion looks good to me ✅
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.
Ticket ENG-3261
Description Of Changes
Follow-up cleanup from #6904 (Re-invite Expired Users). The reinvite endpoint's two-check validation let a disabled user with
disabled_reason=Nonefall through to the service layer, and the reinvite confirmation modal rendered an empty email whenuser.email_addresswas null. Both paths are now closed.Code Changes
reinvite_user(user_endpoints.py) intoif not user.disabled or user.disabled_reason != DisabledReason.pending_invite, closing thedisabled_reason=Nonegap.ReinviteSection's confirmation modal (EditUserForm.tsx) so it only renders whenuser.email_addressis truthy.test_reinvite_user_without_invite_recordtotest_reinvite_disabled_user_without_pending_invite_reasonto reflect what the new endpoint guard rejects.test_reinvite_user_without_invite_recordcovering a user withdisabled_reason=pending_invitebut noFidesUserInviterow, preserving service-layer rejection coverage.Steps to Confirm
pytest tests/ops/api/v1/endpoints/test_user_endpoints.py::TestReinviteUser— all reinvite tests pass.disabled_reasonto NULL directly in the DB.POST /api/v1/user/<user_id>/reinvitereturns 400 with"User does not have a pending invitation."(previously the request fell through to the service layer).email_addressto NULL in the DB, open their edit page in the admin UI, and click "Reinvite user". The confirmation modal asks only "Are you sure you want to send a new invitation to ?" with no trailing "…will be sent to ." sentence.Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works