Skip to content

Show and keep pending email changes when merging people and logins - #3146

Open
maebeale wants to merge 3 commits into
mainfrom
maebeale/pending-email-merge-preview
Open

maebeale wants to merge 3 commits into
mainfrom
maebeale/pending-email-merge-preview

Conversation

@maebeale

@maebeale maebeale commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 3 Read 📖 small merge-behavior change: a folded login's pending email change now moves to the keeper

Admins merging duplicate people or logins can now see a pending email change, and the merge keeps it instead of dropping it.

  • Previews — people: note under each login chip; logins: a "Pending email change" row.
    • Marked "Moves to keeper" or "Will be dropped".
  • Merge — UserServices::MergeLogins.carry_pending_email copies unconfirmed_email, confirmation_token, confirmation_sent_at.
    • The confirmation link already emailed then confirms the kept login.
  • Dropped when the keeper has its own pending change or is unconfirmed (its token is in use).
    • Also dropped when the pending email is already the keeper's.
  • Token is unique-indexed — the keeper is saved only after the merged-away login is destroyed.
  • People merges with 3+ logins: only the first folded pending change can move.

🤖 Generated with Claude Code

@maebeale
maebeale marked this pull request as ready for review December 4, 2026 04:01
maebeale and others added 2 commits December 3, 2026 23:01
Admins merging duplicates couldn't see an email change still awaiting
confirmation, so a merge could silently drop it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@maebeale
maebeale force-pushed the maebeale/pending-email-merge-preview branch from 012a180 to 0c2017e Compare December 4, 2026 04:01
A merge used to drop it, so the confirmation link the person already got
stopped working. Moving the Devise token along keeps that link valid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@maebeale maebeale changed the title Show pending email changes on merge previews Show and keep pending email changes when merging people and logins Dec 4, 2026
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.

1 participant