-
Notifications
You must be signed in to change notification settings - Fork 166
LG-8867: New page to inform user of GPO only #8011
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
Changes from all commits
6f3342d
fdbf976
90d6f87
7474ba5
9ab090d
7089b45
ee52082
b697412
13cf001
58c598c
e3d7310
a42e5fe
d8b4357
6ee0004
114d3de
bc3ed85
c47ef75
b9b7977
2afb44c
d5e4184
3279933
004ea79
3b7a2c0
c2b7f73
06025c0
170624d
746c0e3
fcc6659
31b93ea
e3ff95b
1209f3a
fa94f45
3cbd951
78b730d
e377397
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| module Idv | ||
| class GpoOnlyWarningController < ApplicationController | ||
| include IdvSession | ||
| include StepIndicatorConcern | ||
|
|
||
| before_action :confirm_two_factor_authenticated | ||
|
|
||
| def show | ||
| user_session['idv/doc_auth'][:skip_vendor_outage] = true | ||
| render :show, locals: { current_sp:, exit_url: } | ||
| end | ||
|
|
||
| def exit_url | ||
| current_sp&.return_to_sp_url || account_path | ||
| end | ||
| end | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| class VendorStatus | ||
| class OutageStatus | ||
| include ActionView::Helpers::TranslationHelper | ||
|
|
||
| def initialize(from: nil, from_idv: nil, sp: nil) | ||
|
|
@@ -7,9 +7,9 @@ def initialize(from: nil, from_idv: nil, sp: nil) | |
| @sp = sp | ||
| end | ||
|
|
||
| IAL2_VENDORS = %i[acuant lexisnexis_instant_verify lexisnexis_trueid].freeze | ||
| IDV_VENDORS = %i[acuant lexisnexis_instant_verify lexisnexis_trueid].freeze | ||
solipet marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| PHONE_VENDORS = %i[sms voice].freeze | ||
| ALL_VENDORS = (IAL2_VENDORS + PHONE_VENDORS).freeze | ||
| ALL_VENDORS = (IDV_VENDORS + PHONE_VENDORS).freeze | ||
|
|
||
| def vendor_outage?(vendor) | ||
| status = case vendor | ||
|
|
@@ -37,8 +37,8 @@ def all_vendor_outage?(vendors = ALL_VENDORS) | |
| vendors.all? { |vendor| vendor_outage?(vendor) } | ||
| end | ||
|
|
||
| def any_ial2_vendor_outage? | ||
| any_vendor_outage?(IAL2_VENDORS) | ||
| def any_idv_vendor_outage? | ||
| any_vendor_outage?(IDV_VENDORS) | ||
| end | ||
|
|
||
| def any_phone_vendor_outage? | ||
|
|
@@ -49,6 +49,16 @@ def all_phone_vendor_outage? | |
| all_vendor_outage?(PHONE_VENDORS) | ||
| end | ||
|
|
||
| def gpo_only? | ||
|
||
| IdentityConfig.store.feature_idv_force_gpo_verification_enabled || | ||
| any_phone_vendor_outage? | ||
| end | ||
|
|
||
| def allow_hybrid_flow? | ||
| IdentityConfig.store.feature_idv_hybrid_flow_enabled && | ||
| !any_phone_vendor_outage? | ||
| end | ||
|
|
||
| def from_idv? | ||
| from_idv | ||
| end | ||
|
|
@@ -58,7 +68,7 @@ def from_idv? | |
| # | ||
| # @return [String, nil] the localized message. | ||
| def outage_message | ||
| if any_ial2_vendor_outage? | ||
| if any_idv_vendor_outage? | ||
| if from_idv? | ||
| if sp | ||
| t('vendor_outage.blocked.idv.with_sp', service_provider: sp.friendly_name) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| <%= render StepIndicatorComponent.new( | ||
| steps: step_indicator_steps, | ||
| current_step: :getting_started, | ||
| locale_scope: 'idv', | ||
| class: 'margin-x-neg-2 margin-top-neg-4 tablet:margin-x-neg-6 tablet:margin-top-neg-4', | ||
| ) %> | ||
|
|
||
| <%= render StatusPageComponent.new(status: :warning) do |c| %> | ||
| <% c.header { t('vendor_outage.alerts.pinpoint.idv.header') } %> | ||
| <p> | ||
| <%= t('vendor_outage.alerts.pinpoint.idv.message_html', app_name: APP_NAME, sp_name: current_sp&.friendly_name || APP_NAME) %> | ||
| </p> | ||
| <span><%= t('vendor_outage.alerts.pinpoint.idv.options_prompt') %></span> | ||
| <ul class="margin-bottom-5"> | ||
| <% t('vendor_outage.alerts.pinpoint.idv.options_html', status_page_url: StatusPage.base_url).each do | option | %> | ||
| <li> | ||
| <%= option %> | ||
| </li> | ||
| <% end %> | ||
| </ul> | ||
| <% c.action_button( | ||
| action: ->(**tag_options, &block) do | ||
| link_to(idv_doc_auth_step_path(step: :welcome), **tag_options, &block) | ||
| end, | ||
| big: true, | ||
| wide: true, | ||
| class: 'usa-button', | ||
| ).with_content(t('doc_auth.buttons.continue')) %> | ||
| <% c.action_button( | ||
| action: ->(**tag_options, &block) do | ||
| link_to(exit_url, **tag_options, &block) | ||
| end, | ||
| big: true, | ||
| wide: true, | ||
| outline: true, | ||
| class: 'usa-button', | ||
| ).with_content(t('links.exit_login', app_name: APP_NAME)) %> | ||
| <% c.troubleshooting_options do |tc| %> | ||
| <% tc.header { t('components.troubleshooting_options.default_heading') } %> | ||
| <% tc.option( | ||
| url: StatusPage.base_url, | ||
| new_tab: true, | ||
| ).with_content(t('vendor_outage.get_updates_on_status_page')) %> | ||
| <% if decorated_session.sp_name %> | ||
| <% tc.option( | ||
| url: current_sp.return_to_sp_url, | ||
| new_tab: true, | ||
| ).with_content( | ||
| t('idv.troubleshooting.options.get_help_at_sp', sp_name: decorated_session.sp_name), | ||
| ) %> | ||
| <% end %> | ||
| <% end %> | ||
| <% end %> |
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.
👍 this is a good name