-
Notifications
You must be signed in to change notification settings - Fork 166
LG-5185: Add SMS or Phone call full outage handling #5550
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 56 commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
89eebd0
Disable options on MFA setup screen
aduth e3c007c
Handle vendor outage for setup, sign-in MFA
aduth d7aa6ca
Handle full outage for IDV phone verification
aduth 4b08e93
Move phone controller redirect to before_action
aduth e089885
Simplify / remove memoization for gpo_letter_available?
aduth 6d82ce0
Update alert partial to component
aduth 8b3df07
Add "Get Updates" text
aduth 4e2ef25
Show single vendor outage status on phone setup page
aduth e7a614c
try a VendorOutageAlertComponent component
aduth d7d7ae9
Fix missing &&
aduth 0bbd8b7
Update MFA to use VendorOutageAlertComponent
aduth 739e83e
Update MFA setup to use VnedorOutageAlertComponent
aduth acaf598
Update phone setup to use VnedorOutageAlertComponent
aduth 5177b4a
Remove lingering TranslationHelper
aduth 9ad0dda
Restore show_security_level?
aduth 25cf77a
Fix VendorStatus#outage_message errors
aduth f4cc785
Redirect UsersPhoneController on full phone outage
aduth e0c9339
Move outages sort to content
aduth 396eb76
Fix Spanish, French vendor outage string nesting
aduth db7e8fd
Disable options on IAL2 phone OTP verify step
aduth e0b6012
Update full outage IAL2 message
aduth faffb76
Add missing sms default alerts translations
aduth 3ea2c0f
Normalize YAML
aduth 41f444a
Show IAL2 welcome page alert on combined full outage
aduth 099a529
Show sign-in alert on combined full phone outage
aduth fea280d
Add default blocked phone translations
aduth 98fef67
Disable phone mfa option when "phone" type outage
aduth 2e9639b
Use all_phone_vendor_outage? convenience method
aduth 16b7e76
Ensure same page before pulling error from FormStepsWait
aduth 5a98c26
Remove alert banner from MFA setup page during combined outage
aduth 3a488af
Remove alert banner from IAL2 sign in page
aduth 4e980df
Update alert banner text for voice outage
aduth a376be0
Show alert banner on MFA setup page, only during combined outage
aduth 9eb3029
Add specs for VendorOutageAlertComponent
aduth f7fec66
Fix parameter only_if_both -> only_if_all
aduth b1663e1
Redirect to MFA setup only if MFA not yet set up
aduth 13437c9
Explicitly mark contextual translated keys
aduth 3d8e2fb
make grammer good
aduth 15ba6ec
Update tests for FormStepsWait redirect with error
aduth 99f7358
Redirect phone IDV to vendor outage page as part of redirect_to_next_…
aduth b158d7a
Test VendorOutageController show_gpo_option assignment
aduth 16167d0
Test UsersPhonesController#add redirect on vendor outage
aduth 8079234
Test TwoFactorAuthenticationController
aduth 29fc3b3
Test NewPhoneForm
aduth ba474d3
Implement disabled in specific selection presenters
aduth 8ede032
Test TwoFactorLoginOptionsPresenter#first_enabled_option_index
aduth e3b7693
Test new VendorStatus methods
aduth 720604c
Rename IAL2 outage messages to IDV
aduth 402e629
Test IAL2 Welcome step alert
aduth 726c98c
Test IDV OTP delivery method alert, disabled options
aduth 3dab1d0
Test 2FA options alert, disabled options
aduth 8cf4bfa
Test phone setup phone outage alert
aduth 0829157
Test add phone outage alert
aduth fa5a215
Test _otp_delivery_preference_selection
aduth 9b7f6fc
Test two_factor_authentication_setup/index
aduth dbe8a6b
Test vendor_outage/show
aduth 76235ef
Add missing "Get Updates" translations
aduth 2b225bf
Add spec for fallback alert message behavior
aduth 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 |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <% if content %> | ||
| <%= render(AlertComponent.new(type: :error, class: 'margin-bottom-4')) do %> | ||
| <%= content %> | ||
| <%= new_window_link_to t('vendor_outage.get_updates'), StatusPage.base_url %> | ||
| <% end %> | ||
| <% 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| class VendorOutageAlertComponent < BaseComponent | ||
| include LinkHelper | ||
|
|
||
| def initialize(vendors:, only_if_all: false, context: 'default') | ||
| @vendors = vendors | ||
| @only_if_all = only_if_all | ||
| @context = context | ||
| end | ||
|
|
||
| def content | ||
| case outages.sort | ||
|
aduth marked this conversation as resolved.
|
||
| when [:sms, :voice] | ||
| # i18n-tasks-use t('vendor_outage.alerts.phone.default') | ||
| # i18n-tasks-use t('vendor_outage.alerts.phone.idv') | ||
| t(context, scope: 'vendor_outage.alerts.phone', default: :default) | ||
| when [:sms] | ||
| # i18n-tasks-use t('vendor_outage.alerts.sms.default') | ||
| # i18n-tasks-use t('vendor_outage.alerts.sms.idv') | ||
| t(context, scope: 'vendor_outage.alerts.sms', default: :default) | ||
| when [:voice] | ||
| # i18n-tasks-use t('vendor_outage.alerts.voice.default') | ||
| # i18n-tasks-use t('vendor_outage.alerts.voice.idv') | ||
| t(context, scope: 'vendor_outage.alerts.voice', default: :default) | ||
| end | ||
| end | ||
|
|
||
| private | ||
|
|
||
| attr_reader :vendors, :only_if_all, :context | ||
|
|
||
| def outages | ||
| if only_if_all | ||
| vendor_status.all_vendor_outage?(vendors) ? vendors : [] | ||
| else | ||
| vendors.select { |vendor| vendor_status.vendor_outage?(vendor) } | ||
| end | ||
| end | ||
|
|
||
| def vendor_status | ||
| @vendor_status ||= VendorStatus.new | ||
| end | ||
| 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,10 @@ def html_class | |
| '' | ||
| end | ||
|
|
||
| def disabled? | ||
| false | ||
| end | ||
|
|
||
| private | ||
|
|
||
| def option_mode | ||
|
|
||
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
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.
Uh oh!
There was an error while loading. Please reload this page.