Skip to content
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

Refactor step info preconditions for Socure document capture #11704

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
12 changes: 5 additions & 7 deletions app/controllers/idv/socure/document_capture_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,11 @@ def self.step_info
controller: self,
next_steps: [:ssn, :ipp_ssn],
preconditions: ->(idv_session:, user:) {
idv_session.flow_path == 'standard' && (
# mobile
idv_session.skip_doc_auth_from_handoff ||
idv_session.skip_hybrid_handoff ||
idv_session.skip_doc_auth_from_how_to_verify ||
!idv_session.selfie_check_required ||
idv_session.desktop_selfie_test_mode_enabled?)
idv_session.flow_path == 'standard' &&
!idv_session.selfie_check_required && (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to add

idv_session.idv_consent_given_at.present?

to ensure that we've gone through the agreement page.

# mobile
idv_session.skip_hybrid_handoff ||
idv_session.desktop_selfie_test_mode_enabled?)
},
undo_step: ->(idv_session:, user:) do
idv_session.pii_from_doc = nil
Expand Down