[PM-36014] - Enhanced Invite Validation#855
Open
jrmccannon wants to merge 7 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #855 +/- ##
==========================================
+ Coverage 36.87% 37.19% +0.32%
==========================================
Files 586 587 +1
Lines 31478 31492 +14
Branches 904 904
==========================================
+ Hits 11606 11715 +109
+ Misses 19724 19625 -99
- Partials 148 152 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
abergs
reviewed
May 15, 2026
| !await _invitationService.ConsumeInviteAsync(invite)) | ||
| { | ||
| _eventLogger.LogAdminInvalidInviteUsedEvent(invite, _timeProvider.GetUtcNow().UtcDateTime); | ||
| ModelState.AddModelError("bad-invite", "Invite is invalid or expired"); |
Member
There was a problem hiding this comment.
Would a lower surface area fix be:
A) Properly return Page() in this failure mode
B) Have ConsumeInviteAsync clear expired codes?
abergs
reviewed
May 15, 2026
| return Page(); | ||
| } | ||
|
|
||
| ConsoleAdmin? existingUser = await _userManager.FindByEmailAsync(form.Email); |
Member
There was a problem hiding this comment.
I think allowing changing the Email used when signing up was intentional, but we could swap to use the invited email to harden this surface a bit.
# Conflicts: # tests/AdminConsole.Tests/AdminConsole.Tests.csproj
abergs
previously approved these changes
May 18, 2026
| <label asp-for="Form.Name" class="block text-sm font-medium leading-6 text-gray-900">Admin Name</label> | ||
| <div class="mt-2"> | ||
| <input placeholder="Philip J. Fry" type="text" asp-for="Form.Name" class="text-input"> | ||
| <input type="text" asp-for="Form.Name" class="text-input"> |
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
PM-36014
Description
This adds additional validation around invites and joining an organization. Also added additional clean-up around expired invites.