[User] Send security email when phone number is cleared#13509
Draft
garyhtou wants to merge 1 commit intogaryhtou/user-phone-number-security-emailfrom
Draft
[User] Send security email when phone number is cleared#13509garyhtou wants to merge 1 commit intogaryhtou/user-phone-number-security-emailfrom
garyhtou wants to merge 1 commit intogaryhtou/user-phone-number-security-emailfrom
Conversation
Previously the security-settings-changed email was suppressed when a
user's phone number went from a value to nil. Clearing a phone number
removes SMS 2FA capability, so the account owner should be notified.
When the change is made by an admin via impersonation, the email uses
alternate copy ("Phone number was removed by HCB support") so the user
isn't confused by a notification for an action they didn't take.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment on lines
+255
to
+258
| "Phone number was removed by HCB support" | ||
| else | ||
| "Phone number was removed" | ||
| end |
Contributor
There was a problem hiding this comment.
Suggested change
| "Phone number was removed by HCB support" | |
| else | |
| "Phone number was removed" | |
| end | |
| "Phone number was removed by HCB support" | |
| else | |
| "Phone number was removed" | |
| end |
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.
Summary
Current.session&.impersonated?), the email uses alternate copy: "Phone number was removed by HCB support" (vs. "Phone number was removed" for user-initiated clears) so the user isn't confused by a notification for an action they didn't take.Notes
garyhtou/user-phone-number-security-email(issue [User Onboarding] New users get an erroneous "Security settings changed on your HCB account" #13507 fix) — please merge that first.Test plan
spec/models/user_spec.rb:🤖 Generated with Claude Code