-
Notifications
You must be signed in to change notification settings - Fork 166
LG-15000: Send "Please call" email from other parts of IDV #11662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
add7b21
Rework mailer_helper and add spec
matthinz 9a1e3c7
Add expect_email_not_delivered helper
matthinz 3dffdd8
Update alert_user_about_account_verified_spec
matthinz 851c396
Update IPP code to use idv_please_call email
matthinz ae90b91
Send idv_please_call for GPO verification
matthinz c50cb70
Send 'Please Call' email for phone verification users
matthinz e3f9de4
Attach phone_icon.png rather than referencing by URL
matthinz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,6 +55,8 @@ def create | |
| result = @gpo_verify_form.submit(resolved_authn_context_result.enhanced_ipp?) | ||
| analytics.idv_verify_by_mail_enter_code_submitted(**result) | ||
|
|
||
| send_please_call_email_if_necessary(result:) | ||
|
|
||
| if !result.success? | ||
| if rate_limiter.limited? | ||
| redirect_to idv_enter_code_rate_limited_url | ||
|
|
@@ -120,6 +122,19 @@ def rate_limiter | |
| ) | ||
| end | ||
|
|
||
| # @param [FormResponse] result GpoVerifyForm result | ||
| def send_please_call_email_if_necessary(result:) | ||
| return if !result.success? | ||
|
|
||
| return if result.extra[:pending_in_person_enrollment] | ||
|
|
||
| return if !result.extra[:fraud_check_failed] | ||
|
|
||
| return if !FeatureManagement.proofing_device_profiling_decisioning_enabled? | ||
|
Comment on lines
+129
to
+133
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually prefer what you have, but I feel like this would more typically be written like: if result.extra[:pending_in_person_enrollment] ||
!result.extra[:fraud_check_failed] ||
!FeatureManagement.proofing_device_profiling_decisioning_enabled?
returnBut I like the idea of normalizing simpler lines. 👏 |
||
|
|
||
| current_user.send_email_to_all_addresses(:idv_please_call) | ||
| end | ||
|
|
||
| def build_gpo_verify_form | ||
| GpoVerifyForm.new( | ||
| user: current_user, | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -143,6 +143,10 @@ def init_profile | |
| log_letter_enqueued_analytics(resend: false) | ||
| end | ||
|
|
||
| if profile.fraud_review_pending? && !profile.in_person_verification_pending? | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍🏻 |
||
| current_user.send_email_to_all_addresses(:idv_please_call) | ||
| end | ||
|
|
||
| if profile.active? | ||
| create_user_event(:account_verified) | ||
| UserAlerts::AlertUserAboutAccountVerified.call( | ||
|
|
||
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never forget. https://gsa-tts.slack.com/archives/C0NGESUN5/p1731711249352069?thread_ts=1731710722.094409&cid=C0NGESUN5