Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/controllers/concerns/verify_profile_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ def user_last_signed_in_more_than_5_months_ago?

def profile_needs_verification?
return false if current_user.blank?
return false if sp_session[:ial2_strict] &&
!IdentityConfig.store.gpo_allowed_for_strict_ial2
current_user.decorate.pending_profile_requires_verification? ||
user_needs_to_reactivate_account?
end
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/idv/doc_auth_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ def return_to_sp
end

def redirect_if_pending_profile
return if sp_session[:ial2_strict] &&
!IdentityConfig.store.gpo_allowed_for_strict_ial2
redirect_to idv_gpo_verify_url if current_user.decorate.pending_profile_requires_verification?
end

Expand Down
7 changes: 0 additions & 7 deletions app/controllers/idv/gpo_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ class GpoController < ApplicationController
before_action :confirm_idv_needed
before_action :confirm_user_completed_idv_profile_step
before_action :confirm_mail_not_spammed
before_action :confirm_gpo_allowed_if_strict_ial2

def index
@presenter = GpoPresenter.new(current_user, url_options)
Expand Down Expand Up @@ -57,12 +56,6 @@ def resend_requested?
current_user.decorate.pending_profile_requires_verification?
end

def confirm_gpo_allowed_if_strict_ial2
return unless sp_session[:ial2_strict]
return if IdentityConfig.store.gpo_allowed_for_strict_ial2
redirect_to idv_phone_url
end

def confirm_mail_not_spammed
redirect_to idv_review_url if idv_session.address_mechanism_chosen? &&
gpo_mail_service.mail_spammed?
Expand Down
4 changes: 1 addition & 3 deletions app/controllers/idv/otp_delivery_method_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ def otp_delivery_selection_form
def gpo_letter_available
return @gpo_letter_available if defined?(@gpo_letter_available)
@gpo_letter_available ||= FeatureManagement.enable_gpo_verification? &&
!Idv::GpoMail.new(current_user).mail_spammed? &&
!(sp_session[:ial2_strict] &&
!IdentityConfig.store.gpo_allowed_for_strict_ial2)
!Idv::GpoMail.new(current_user).mail_spammed?
end
end
end
4 changes: 1 addition & 3 deletions app/controllers/idv/phone_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ def new_phone_added?
def gpo_letter_available
return @gpo_letter_available if defined?(@gpo_letter_available)
@gpo_letter_available ||= FeatureManagement.enable_gpo_verification? &&
!Idv::GpoMail.new(current_user).mail_spammed? &&
!(sp_session[:ial2_strict] &&
!IdentityConfig.store.gpo_allowed_for_strict_ial2)
!Idv::GpoMail.new(current_user).mail_spammed?
end
end
end
4 changes: 1 addition & 3 deletions app/controllers/idv/phone_errors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ def track_event(type:)
def set_gpo_letter_available
return @gpo_letter_available if defined?(@gpo_letter_available)
@gpo_letter_available ||= FeatureManagement.enable_gpo_verification? &&
!Idv::GpoMail.new(current_user).mail_spammed? &&
!(sp_session[:ial2_strict] &&
!IdentityConfig.store.gpo_allowed_for_strict_ial2)
!Idv::GpoMail.new(current_user).mail_spammed?
end
# rubocop:enable Naming/MemoizedInstanceVariableName
end
Expand Down
4 changes: 1 addition & 3 deletions app/models/profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ def includes_phone_check?

def strict_ial2_proofed?
return false unless active
return false unless includes_liveness_check?
return true if IdentityConfig.store.gpo_allowed_for_strict_ial2
includes_phone_check?
includes_liveness_check?
end

def has_proofed_before?
Expand Down
1 change: 0 additions & 1 deletion config/application.yml.default
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ usps_mock_fallback: true
get_usps_proofing_results_job_cron: '0/10 * * * *'
get_usps_proofing_results_job_reprocess_delay_minutes: 5
get_usps_proofing_results_job_request_delay_milliseconds: 1000
gpo_allowed_for_strict_ial2: true
voice_otp_pause_time: '0.5s'
voice_otp_speech_rate: 'slow'
voip_check: true
Expand Down
1 change: 0 additions & 1 deletion lib/identity_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ def self.build_store(config_map)
config.add(:get_usps_proofing_results_job_cron, type: :string)
config.add(:get_usps_proofing_results_job_reprocess_delay_minutes, type: :integer)
config.add(:get_usps_proofing_results_job_request_delay_milliseconds, type: :integer)
config.add(:gpo_allowed_for_strict_ial2, type: :boolean)
config.add(:usps_upload_sftp_directory, type: :string)
config.add(:usps_upload_sftp_host, type: :string)
config.add(:usps_upload_sftp_password, type: :string)
Expand Down
58 changes: 0 additions & 58 deletions spec/features/idv/strict_ial2/upgrade_spec.rb

This file was deleted.

75 changes: 0 additions & 75 deletions spec/features/idv/strict_ial2/usps_upload_disallowed_spec.rb

This file was deleted.

51 changes: 7 additions & 44 deletions spec/models/profile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,55 +93,18 @@
expect(profile.strict_ial2_proofed?).to eq(false)
end

it 'returns false if the profile does not have liveness' do
proofing_components = { liveness_check: nil, address_check: :lexis_nexis_address }
it 'returns true if the profile does have liveness' do
proofing_components = { liveness_check: :acuant }
profile = create(:profile, :active, proofing_components: proofing_components)

expect(profile.strict_ial2_proofed?).to eq(false)
end

context 'the letter flow is allowed for strict IAL2' do
before do
allow(IdentityConfig.store).to receive(
:gpo_allowed_for_strict_ial2,
).and_return(true)
end

it 'returns true for a profile with a phone' do
proofing_components = { liveness_check: :acuant, address_check: :lexis_nexis_address }
profile = create(:profile, :active, proofing_components: proofing_components)

expect(profile.strict_ial2_proofed?).to eq(true)
end

it 'return true for a profile with a letter' do
proofing_components = { liveness_check: :acuant, address_check: :gpo_letter }
profile = create(:profile, :active, proofing_components: proofing_components)

expect(profile.strict_ial2_proofed?).to eq(true)
end
expect(profile.strict_ial2_proofed?).to eq(true)
end

context 'the letter flow is not allowed for strict IAL2' do
before do
allow(IdentityConfig.store).to receive(
:gpo_allowed_for_strict_ial2,
).and_return(false)
end

it 'returns true for a profile with a phone' do
proofing_components = { liveness_check: :acuant, address_check: :lexis_nexis_address }
profile = create(:profile, :active, proofing_components: proofing_components)

expect(profile.strict_ial2_proofed?).to eq(true)
end

it 'return false for a profile with a letter' do
proofing_components = { liveness_check: :acuant, address_check: :gpo_letter }
profile = create(:profile, :active, proofing_components: proofing_components)
it 'returns false if the profile does not have liveness' do
proofing_components = { liveness_check: nil }
profile = create(:profile, :active, proofing_components: proofing_components)

expect(profile.strict_ial2_proofed?).to eq(false)
end
expect(profile.strict_ial2_proofed?).to eq(false)
end
end

Expand Down