Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
bc81983
Make the document capture step enabled by default in the tests
jmhooper Oct 27, 2020
b9958fb
no clue why i deleted this
jmhooper Dec 11, 2020
70a6002
no clue why i did this either
jmhooper Dec 11, 2020
48989b3
fix smoke tests
jmhooper Dec 11, 2020
cd44912
put geocoder stubs back the way i found them
jmhooper Dec 11, 2020
afca096
rebuild simulate_image_upload_api_submission
jmhooper Dec 11, 2020
7f4b11f
Remove the legacy doc auth steps and feature flags
jmhooper Dec 11, 2020
25b7b6c
A few test fixes
jmhooper Dec 15, 2020
f7600a1
Merge branch 'master' into jmhooper-remove-legacy-image-steps
jmhooper Dec 15, 2020
191a825
fix the send link steps
jmhooper Dec 15, 2020
efd6454
fix more tests
jmhooper Dec 17, 2020
6f8a88b
Merge branch 'master' into jmhooper-remove-legacy-image-steps
jmhooper Dec 17, 2020
1c112c2
Remove unused form and fix tests
jmhooper Dec 17, 2020
59abdb1
Clean out old doc capture model code
jmhooper Dec 17, 2020
f8f525e
fix some controller specs
jmhooper Dec 17, 2020
b44fa92
more controller test fixes
jmhooper Dec 17, 2020
d7e07c6
More test cleanup
jmhooper Dec 17, 2020
712ee13
Remove unused translations
jmhooper Dec 17, 2020
9d5a1c7
Put the time translations back the way they were
jmhooper Dec 17, 2020
fdb3f05
use session uuid
jmhooper Dec 17, 2020
c71b073
Update spec/support/features/doc_capture_helper.rb
jmhooper Dec 21, 2020
993c50d
further cleanup
jmhooper Dec 21, 2020
2c83e26
Remove a test support file
jmhooper Dec 21, 2020
f320b8e
Cleanup whitespace
jmhooper Dec 21, 2020
7ad9633
remove notices code
jmhooper Dec 21, 2020
0862ad5
Update app/services/idv/steps/upload_step.rb
jmhooper Dec 21, 2020
93f8f22
Update spec/controllers/idv/capture_doc_controller_spec.rb
jmhooper Dec 21, 2020
63d3044
Merge branch 'master' into jmhooper-remove-legacy-image-steps
jmhooper Dec 22, 2020
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
13 changes: 0 additions & 13 deletions app/assets/images/state-id-back.svg

This file was deleted.

75 changes: 0 additions & 75 deletions app/assets/images/state-id-front.svg

This file was deleted.

Binary file removed app/assets/images/state-id-sample-back.jpg
Binary file not shown.
Binary file removed app/assets/images/state-id-sample-front.jpg
Binary file not shown.
33 changes: 2 additions & 31 deletions app/controllers/idv/capture_doc_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,21 @@ class CaptureDocController < ApplicationController
analytics_id: Analytics::CAPTURE_DOC,
}.freeze

def index
##
# This allows us to switch between the old doc auth step by step flow and
# the new document capture flow. When the old step by step flow is retired
# we should remove this logic and redirect the user directly to the show
# action.
#
if FeatureManagement.document_capture_step_enabled?
flow.mark_step_complete(:mobile_front_image)
flow.mark_step_complete(:capture_mobile_back_image)
flow.mark_step_complete(:selfie)
else
flow.mark_step_complete(:document_capture)
end
redirect_to_step(next_step)
end

private

def ensure_user_id_in_session
return if session[:doc_capture_user_id] &&
token.blank? &&
document_capture_session_uuid.blank?

result = if FeatureManagement.document_capture_step_enabled?
CaptureDoc::ValidateDocumentCaptureSession.new(document_capture_session_uuid).call
else
CaptureDoc::ValidateRequestToken.new(token).call
end
result = CaptureDoc::ValidateDocumentCaptureSession.new(document_capture_session_uuid).call

analytics.track_event(FSM_SETTINGS[:analytics_id], result.to_h)
process_result(result)
end

def add_unsafe_eval_to_capture_steps
return unless %w[
front_image
back_image
mobile_front_image
mobile_back_image
capture_mobile_back_image
selfie
document_capture
].include?(current_step)
return unless current_step == 'document_capture'

# required to run wasm until wasm-eval is available
SecureHeaders.append_content_security_policy_directives(
Expand Down
15 changes: 1 addition & 14 deletions app/controllers/idv/capture_doc_status_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,11 @@ class CaptureDocStatusController < ApplicationController
respond_to :json

def show
result = if FeatureManagement.document_capture_step_enabled?
document_capture_session_poll_render_result
else
doc_capture_poll_render_result
end

render result
render document_capture_session_poll_render_result
end

private

def doc_capture_poll_render_result
doc_capture = DocCapture.find_by(user_id: current_user.id)
return { plain: 'Unauthorized', status: :unauthorized } if doc_capture.blank?
return { plain: 'Pending', status: :accepted } if doc_capture.acuant_token.blank?
{ plain: 'Complete', status: :ok }
end

def document_capture_session_poll_render_result
session_uuid = flow_session[:document_capture_session_uuid]
document_capture_session = DocumentCaptureSession.find_by(uuid: session_uuid)
Expand Down
Loading