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
3 changes: 2 additions & 1 deletion app/controllers/idv/document_capture_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def extra_view_variables
sp_name: decorated_sp_session.sp_name,
failure_to_proof_url: return_to_sp_failure_to_proof_url(step: 'document_capture'),
skip_doc_auth: idv_session.skip_doc_auth,
skip_doc_auth_from_how_to_verify: false,
skip_doc_auth_from_how_to_verify: idv_session.skip_doc_auth_from_how_to_verify,
skip_doc_auth_from_handoff: idv_session.skip_doc_auth_from_handoff,
opted_in_to_in_person_proofing: idv_session.opted_in_to_in_person_proofing,
doc_auth_selfie_capture:,
Expand All @@ -73,6 +73,7 @@ def self.step_info
idv_session.skip_doc_auth_from_handoff ||
idv_session.skip_hybrid_handoff ||
idv_session.skip_doc_auth ||
idv_session.skip_doc_auth_from_how_to_verify ||
!idv_session.selfie_check_required || # desktop but selfie not required
idv_session.desktop_selfie_test_mode_enabled?
)
Expand Down
3 changes: 3 additions & 0 deletions app/controllers/idv/how_to_verify_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ def update
if how_to_verify_form_params['selection'] == Idv::HowToVerifyForm::REMOTE
idv_session.opted_in_to_in_person_proofing = false
idv_session.skip_doc_auth = false
idv_session.skip_doc_auth_from_how_to_verify = false
redirect_to idv_hybrid_handoff_url
else
idv_session.opted_in_to_in_person_proofing = true
idv_session.flow_path = 'standard'
idv_session.skip_doc_auth = true
idv_session.skip_doc_auth_from_how_to_verify = true
redirect_to idv_document_capture_url
end

Expand All @@ -70,6 +72,7 @@ def self.step_info
end,
undo_step: ->(idv_session:, user:) {
idv_session.skip_doc_auth = nil
idv_session.skip_doc_auth_from_how_to_verify = nil
idv_session.opted_in_to_in_person_proofing = nil
},
)
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/idv/hybrid_handoff_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def self.selected_remote(idv_session:)
idv_session.service_provider&.in_person_proofing_enabled
idv_session.skip_doc_auth == false
else
idv_session.skip_doc_auth.nil? || idv_session.skip_doc_auth == false
idv_session.skip_doc_auth.nil? ||
idv_session.skip_doc_auth == false
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/idv/document_capture/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
acuant_version: acuant_version,
opted_in_to_in_person_proofing: opted_in_to_in_person_proofing,
skip_doc_auth: skip_doc_auth,
skip_doc_auth_from_how_to_verify: false,
skip_doc_auth_from_how_to_verify: skip_doc_auth_from_how_to_verify,
skip_doc_auth_from_handoff: skip_doc_auth_from_handoff,
doc_auth_selfie_capture: doc_auth_selfie_capture,
) %>
2 changes: 1 addition & 1 deletion app/views/idv/shared/_document_capture.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
doc_auth_selfie_capture: FeatureManagement.idv_allow_selfie_check? && doc_auth_selfie_capture,
doc_auth_selfie_desktop_test_mode: IdentityConfig.store.doc_auth_selfie_desktop_test_mode,
skip_doc_auth: skip_doc_auth,
skip_doc_auth_from_how_to_verify: false,
skip_doc_auth_from_how_to_verify: skip_doc_auth_from_how_to_verify,
skip_doc_auth_from_handoff: skip_doc_auth_from_handoff,
how_to_verify_url: idv_how_to_verify_url,
previous_step_url: @previous_step_url,
Expand Down
8 changes: 8 additions & 0 deletions spec/controllers/idv/how_to_verify_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

expect(Idv::HowToVerifyController.enabled?).to be false
expect(subject.idv_session.skip_doc_auth).to be_nil
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be_nil
expect(response).to redirect_to(idv_hybrid_handoff_url)
end
end
Expand All @@ -57,6 +58,7 @@

expect(Idv::HowToVerifyController.enabled?).to be false
expect(subject.idv_session.skip_doc_auth).to be_nil
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be_nil
expect(response).to redirect_to(idv_hybrid_handoff_url)
end
end
Expand All @@ -72,6 +74,7 @@

expect(Idv::HowToVerifyController.enabled?).to be false
expect(subject.idv_session.skip_doc_auth).to be_nil
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be_nil
expect(response).to redirect_to(idv_hybrid_handoff_url)
end
end
Expand All @@ -84,6 +87,7 @@
expect(Idv::HowToVerifyController.enabled?).to be true
expect(subject.idv_session.service_provider.in_person_proofing_enabled).to be true
expect(subject.idv_session.skip_doc_auth).to be_nil
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be_nil
expect(response).to render_template :show
end
end
Expand Down Expand Up @@ -120,6 +124,7 @@
get :show

expect(subject.idv_session.skip_doc_auth).to be_nil
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be_nil
expect(response).to render_template :show
end

Expand Down Expand Up @@ -193,6 +198,7 @@
put :update, params: params

expect(subject.idv_session.skip_doc_auth).to be false
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be false
expect(response).to redirect_to(idv_hybrid_handoff_url)
end

Expand Down Expand Up @@ -220,6 +226,7 @@
put :update, params: params

expect(subject.idv_session.skip_doc_auth).to be true
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be true
expect(response).to redirect_to(idv_document_capture_url)
end

Expand All @@ -235,6 +242,7 @@
put :update, params: { undo_step: true }

expect(subject.idv_session.skip_doc_auth).to be_nil
expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be_nil
expect(subject.idv_session.opted_in_to_in_person_proofing).to be_nil
expect(response).to redirect_to(idv_how_to_verify_url)
end
Expand Down
3 changes: 3 additions & 0 deletions spec/controllers/idv/hybrid_handoff_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
allow(IdentityConfig.store).to receive(:doc_auth_selfie_desktop_test_mode).
and_return(false)
subject.idv_session.skip_doc_auth = nil
subject.idv_session.skip_doc_auth_from_how_to_verify = nil
end

it 'redirects to how to verify' do
Expand All @@ -241,6 +242,7 @@
allow(IdentityConfig.store).to receive(:doc_auth_selfie_desktop_test_mode).
and_return(false)
subject.idv_session.skip_doc_auth = true
subject.idv_session.skip_doc_auth_from_how_to_verify = true
subject.idv_session.skip_hybrid_handoff = true
end

Expand All @@ -255,6 +257,7 @@
before do
subject.idv_session.service_provider.in_person_proofing_enabled = false
subject.idv_session.skip_doc_auth = nil
subject.idv_session.skip_doc_auth_from_how_to_verify = nil
end

it 'renders the show template' do
Expand Down
1 change: 1 addition & 0 deletions spec/support/flow_policy_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def stub_step(key:, idv_session:)
idv_session.idv_consent_given = true
when :how_to_verify
idv_session.skip_doc_auth = false
idv_session.skip_doc_auth_from_how_to_verify = false
when :hybrid_handoff
idv_session.flow_path = 'standard'
when :link_sent
Expand Down
3 changes: 2 additions & 1 deletion spec/views/idv/shared/_document_capture.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

let(:acuant_version) { '1.3.3.7' }
let(:skip_doc_auth) { false }
let(:skip_doc_auth_from_how_to_verify) { false }
let(:skip_doc_auth_from_handoff) { false }
let(:opted_in_to_in_person_proofing) { false }

Expand Down Expand Up @@ -48,7 +49,7 @@
acuant_version: acuant_version,
doc_auth_selfie_capture: selfie_capture_enabled,
skip_doc_auth: skip_doc_auth,
skip_doc_auth_from_how_to_verify: false,
skip_doc_auth_from_how_to_verify: skip_doc_auth_from_how_to_verify,
skip_doc_auth_from_handoff: skip_doc_auth_from_handoff,
opted_in_to_in_person_proofing: opted_in_to_in_person_proofing,
}
Expand Down