Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
4160012
remove including dav from proof_resolution in agent
svalexander Sep 13, 2023
f4c4e25
remove capture_secondary_id_enabled from address form, validator and …
svalexander Sep 13, 2023
64d01c5
remove dav and capture secondary id from verify info
svalexander Sep 14, 2023
1375409
lint fixes
svalexander Sep 15, 2023
4d2d68f
merge conflict resolution
svalexander Sep 15, 2023
d9b5b12
remove capture_secondary_id from state id step
svalexander Sep 15, 2023
594883b
update in person spec and helper
svalexander Sep 18, 2023
068e892
update idv step helper
svalexander Sep 18, 2023
ceeab97
Merge branch 'main' into shannon/lg-9192-remove-dav-flag
svalexander Sep 18, 2023
9948b1c
remove unused strings
svalexander Sep 18, 2023
b4fca4e
update step specs
svalexander Sep 18, 2023
50c9876
merge conflict fix
svalexander Sep 18, 2023
4a44a51
update ssn and verify info specs
svalexander Sep 18, 2023
1b79715
fix spacing for view files
svalexander Sep 18, 2023
c7184c8
update test names in state id step spec
svalexander Sep 18, 2023
4f6e353
update proofers, jobs and analytics spec
svalexander Sep 20, 2023
7236369
update progressive proofer spec
svalexander Sep 20, 2023
77a46d2
update pii in res proofing job spec
svalexander Sep 20, 2023
cab5c21
keep dav for proofing
svalexander Sep 21, 2023
e60bf1b
revert changes
svalexander Sep 22, 2023
b2c06ff
use analytics id for dav value
svalexander Sep 22, 2023
6548a84
reference dav in specs again
svalexander Sep 22, 2023
abaf344
make same_address_id false in analytics_spec so all in person events …
svalexander Sep 22, 2023
21a4a3d
remove unused address2_optional string
svalexander Sep 22, 2023
0a90f16
remove more instances of capture secondary id enabled
svalexander Sep 22, 2023
6fffec0
update email specs
svalexander Sep 25, 2023
63eb9e3
update enrollment helper spec
svalexander Sep 26, 2023
a9b4f9c
update review spec to use mock ipp applicant and lint fix
svalexander Sep 27, 2023
4912fa0
lint fix to constants files
svalexander Sep 27, 2023
f09544d
Merge branch 'main' into shannon/lg-9192-remove-dav-flag
svalexander Sep 27, 2023
b7969e7
remove dav disabled cases from prog proofer and res adjudicator specs
svalexander Sep 27, 2023
a452cc0
update spec names in get usps proofing job
svalexander Sep 27, 2023
c1bff8a
changelog: Internal, Double address verification, make dav default st…
svalexander Sep 27, 2023
90510ca
remove capture secondary id flag from id_config
svalexander Sep 27, 2023
383c56c
add back in necessary tests and replace analytics_id check
svalexander Sep 28, 2023
ea25867
remove needs_proof_of_address which would always be false
svalexander Sep 28, 2023
8f351ca
remove unused translations related to needs_proof_of_address
svalexander Sep 28, 2023
39494b4
remove enrollment from passed_with_unsupported_secondary_id_type
svalexander Sep 28, 2023
1bc5dfa
remove reference to strings that are removed
svalexander Sep 28, 2023
274ce94
remove config from application.yml.default
svalexander Sep 29, 2023
e3fb772
implement feedback
svalexander Oct 6, 2023
e9e4b70
Merge branch 'main' into shannon/lg-9192-remove-dav-flag
svalexander Oct 6, 2023
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
10 changes: 6 additions & 4 deletions app/controllers/concerns/idv/verify_info_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,19 @@ def shared_update
user_id: current_user.id,
threatmetrix_session_id: idv_session.threatmetrix_session_id,
request_ip: request.remote_ip,
double_address_verification: capture_secondary_id_enabled,
double_address_verification: double_address_verification,
)

return true
end

private

def capture_secondary_id_enabled
current_user.establishing_in_person_enrollment&.
capture_secondary_id_enabled || false
def double_address_verification
# If in person return true else return false. This is temporary until we add a feature flag
# to track enrollment was created in the in person flow.
# todo LG-11235 update value based on new feature flag
current_user.has_in_person_enrollment?
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated this line of code but the previous comment still stands so will re-paste here:

temporarily using double_address_verification to check if we're in the ipp flow in files related to the proofing job and result adjudication. Will add a ticket that adds flag for enrollments that are created in the ipp flow in order to distinguish those enrollments in the files that still reference double_address_verification

end

def should_use_aamva?(pii)
Expand Down
1 change: 0 additions & 1 deletion app/controllers/idv/in_person/verify_info_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class VerifyInfoController < ApplicationController
def show
@step_indicator_steps = step_indicator_steps
@ssn = idv_session.ssn
@capture_secondary_id_enabled = capture_secondary_id_enabled

analytics.idv_doc_auth_verify_visited(**analytics_arguments)
Funnel::DocAuth::RegisterStep.new(current_user.id, sp_session[:issuer]).
Expand Down
7 changes: 0 additions & 7 deletions app/forms/idv/in_person/address_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ class AddressForm

attr_accessor(*ATTRIBUTES)

def initialize(capture_secondary_id_enabled:)
@capture_secondary_id_enabled = capture_secondary_id_enabled
end

def self.model_name
ActiveModel::Name.new(self, nil, 'InPersonAddress')
end
Expand All @@ -33,9 +29,6 @@ def submit(params)

private

attr_reader :capture_secondary_id_enabled
alias_method :capture_secondary_id_enabled?, :capture_secondary_id_enabled

def consume_params(params)
params.each do |key, value|
raise_invalid_address_parameter_error(key) unless ATTRIBUTES.include?(key.to_sym)
Expand Down
6 changes: 1 addition & 5 deletions app/forms/idv/state_id_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ def self.model_name
ActiveModel::Name.new(self, nil, 'StateId')
end

def initialize(pii, capture_secondary_id_enabled:)
def initialize(pii)
@pii = pii
@capture_secondary_id_enabled = capture_secondary_id_enabled
end

def submit(params)
Expand All @@ -36,9 +35,6 @@ def submit(params)

private

attr_reader :capture_secondary_id_enabled
alias_method :capture_secondary_id_enabled?, :capture_secondary_id_enabled

def consume_params(params)
params.each do |key, value|
raise_invalid_state_id_parameter_error(key) unless ATTRIBUTES.include?(key.to_sym)
Expand Down
7 changes: 3 additions & 4 deletions app/jobs/get_usps_proofing_results_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ def check_enrollment(enrollment)
enrollment.update(status_check_attempted_at: status_check_attempted_at)
end

def passed_with_unsupported_secondary_id_type?(enrollment, response)
return enrollment.capture_secondary_id_enabled &&
response['secondaryIdType'].present? &&
def passed_with_unsupported_secondary_id_type?(response)
return response['secondaryIdType'].present? &&
SUPPORTED_SECONDARY_ID_TYPES.exclude?(response['secondaryIdType'])
end

Expand Down Expand Up @@ -414,7 +413,7 @@ def process_enrollment_response(enrollment, response)

case response['status']
when IPP_STATUS_PASSED
if passed_with_unsupported_secondary_id_type?(enrollment, response)
if passed_with_unsupported_secondary_id_type?(response)
handle_unsupported_secondary_id(enrollment, response)
elsif SUPPORTED_ID_TYPES.include?(response['primaryIdType'])
handle_successful_status_update(enrollment, response)
Expand Down
7 changes: 0 additions & 7 deletions app/models/in_person_enrollment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class InPersonEnrollment < ApplicationRecord
before_save(:on_status_updated, if: :will_save_change_to_status?)
before_save(:on_notification_sent_at_updated, if: :will_save_change_to_notification_sent_at?)
before_create(:set_unique_id, unless: :unique_id)
before_create(:set_capture_secondary_id)

class << self
def needs_early_email_reminder(early_benchmark, late_benchmark)
Expand Down Expand Up @@ -182,10 +181,4 @@ def profile_belongs_to_user
type: :in_person_enrollment_user_profile_mismatch
end
end

def set_capture_secondary_id
if IdentityConfig.store.in_person_capture_secondary_id_enabled
self.capture_secondary_id_enabled = true
end
end
end
4 changes: 0 additions & 4 deletions app/presenters/idv/in_person/ready_to_verify_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ def selected_location_hours(prefix)
return localized_hours(hours) if hours
end

def needs_proof_of_address?
!(enrollment.current_address_matches_id || enrollment.capture_secondary_id_enabled)
end

def service_provider
enrollment.service_provider
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ def service_provider_homepage_url
sp_return_url_resolver.homepage_url if service_provider
end

def needs_proof_of_address?
!(enrollment.current_address_matches_id || enrollment.capture_secondary_id_enabled)
end

private

def sp_return_url_resolver
Expand Down
4 changes: 0 additions & 4 deletions app/services/idv/steps/doc_auth_base_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ def initialize(flow)

private

def capture_secondary_id_enabled?
current_user.establishing_in_person_enrollment.capture_secondary_id_enabled
end

def save_proofing_components
return unless current_user

Expand Down
16 changes: 4 additions & 12 deletions app/services/idv/steps/in_person/address_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,14 @@ def self.analytics_visited_event
end

def analytics_submitted_event
if capture_secondary_id_enabled?
:idv_in_person_proofing_residential_address_submitted
else
:idv_in_person_proofing_address_submitted
end
:idv_in_person_proofing_residential_address_submitted
end

def call
attrs = Idv::InPerson::AddressForm::ATTRIBUTES

if capture_secondary_id_enabled?
attrs = attrs.difference([:same_address_as_id])
flow_session[:pii_from_user][:same_address_as_id] = 'false' if updating_address?
end
attrs = attrs.difference([:same_address_as_id])
flow_session[:pii_from_user][:same_address_as_id] = 'false' if updating_address?

attrs.each do |attr|
flow_session[:pii_from_user][attr] = flow_params[attr]
Expand All @@ -35,7 +29,6 @@ def call

def extra_view_variables
{
capture_secondary_id_enabled: capture_secondary_id_enabled?,
form:,
pii:,
updating_address: updating_address?,
Expand All @@ -61,8 +54,7 @@ def flow_params
end

def form
@form ||= Idv::InPerson::AddressForm.
new(capture_secondary_id_enabled: capture_secondary_id_enabled?)
@form ||= Idv::InPerson::AddressForm.new
end

def form_submit
Expand Down
28 changes: 11 additions & 17 deletions app/services/idv/steps/in_person/state_id_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,25 @@ def call
formatted_dob = MemorableDateComponent.extract_date_param flow_params&.[](:dob)
pii_from_user[:dob] = formatted_dob if formatted_dob

if capture_secondary_id_enabled?
if pii_from_user[:same_address_as_id] == 'true'
copy_state_id_address_to_residential_address(pii_from_user)
mark_step_complete(:address)
redirect_to idv_in_person_ssn_url
end

if initial_state_of_same_address_as_id == 'true' &&
pii_from_user[:same_address_as_id] == 'false'
clear_residential_address(pii_from_user)
mark_step_incomplete(:address)
end
if pii_from_user[:same_address_as_id] == 'true'
copy_state_id_address_to_residential_address(pii_from_user)
mark_step_complete(:address)
redirect_to idv_in_person_ssn_url
end

if initial_state_of_same_address_as_id == 'true' &&
pii_from_user[:same_address_as_id] == 'false'
clear_residential_address(pii_from_user)
mark_step_incomplete(:address)
end

if flow_session['Idv::Steps::InPerson::AddressStep']
redirect_to idv_in_person_verify_info_url
end
end

def extra_view_variables
{
capture_secondary_id_enabled: capture_secondary_id_enabled?,
form:,
pii:,
parsed_dob:,
Expand Down Expand Up @@ -104,10 +101,7 @@ def flow_params
end

def form
@form ||= Idv::StateIdForm.new(
current_user,
capture_secondary_id_enabled: capture_secondary_id_enabled?,
)
@form ||= Idv::StateIdForm.new(current_user)
end

def form_submit
Expand Down
5 changes: 2 additions & 3 deletions app/services/usps_in_person_proofing/enrollment_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ def schedule_in_person_enrollment(user, pii)
enrollment.current_address_matches_id = pii['same_address_as_id']
enrollment.save!

# If we're using secondary ID capture (aka double address verification),
# then send the state ID address to USPS. Otherwise send the residential address.
# Send state ID address to USPS
pii = pii.to_h
if enrollment.capture_secondary_id_enabled? && !enrollment.current_address_matches_id?
if !enrollment.current_address_matches_id?
pii = pii.except(*SECONDARY_ID_ADDRESS_MAP.values).
transform_keys(SECONDARY_ID_ADDRESS_MAP)
end
Expand Down
7 changes: 2 additions & 5 deletions app/validators/idv/form_state_id_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ module FormStateIdValidator
validates :first_name,
:last_name,
:dob,
:identity_doc_address1,
:identity_doc_city,
:state_id_jurisdiction,
:state_id_number,
presence: true

validates :identity_doc_address1,
:identity_doc_city,
presence: true,
if: :capture_secondary_id_enabled?

validates_with UspsInPersonProofing::TransliterableValidator,
fields: [:first_name, :last_name, :identity_doc_city],
reject_chars: /[^A-Za-z\-' ]/,
Expand Down
4 changes: 0 additions & 4 deletions app/validators/idv/in_person/form_address_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ module FormAddressValidator
include Idv::FormAddressValidator

included do
validates :same_address_as_id,
presence: true,
unless: :capture_secondary_id_enabled?

validates_with UspsInPersonProofing::TransliterableValidator,
fields: [:city],
reject_chars: /[^A-Za-z\-' ]/,
Expand Down
68 changes: 12 additions & 56 deletions app/views/idv/in_person/address.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,21 @@
<%= render PageHeadingComponent.new.with_content(t('in_person_proofing.headings.address')) %>
<% end %>

<% unless capture_secondary_id_enabled %>
<p>
<%= t('in_person_proofing.body.address.info') %>
<%= new_tab_link_to(
t('in_person_proofing.body.address.learn_more'),
MarketingSite.help_center_article_url(
category: 'verify-your-identity',
article: 'verify-your-identity-in-person',
),
) %>
</p>
<% end %>

<%= simple_form_for(
form, url: url_for, method: 'PUT',
html: { autocomplete: 'off' }
) do |f| %>
<% if capture_secondary_id_enabled %>
<%= render ValidatedFieldComponent.new(
collection: us_states_territories,
form: f,
input_html: { class: 'address-state-selector' },
label: t('idv.form.state'),
label_html: { class: 'usa-label' },
name: :state,
prompt: t('in_person_proofing.form.address.state_prompt'),
required: true,
selected: pii[:state],
) %>
<% end %>
<%= render ValidatedFieldComponent.new(
collection: us_states_territories,
form: f,
input_html: { class: 'address-state-selector' },
label: t('idv.form.state'),
label_html: { class: 'usa-label' },
name: :state,
prompt: t('in_person_proofing.form.address.state_prompt'),
required: true,
selected: pii[:state],
) %>
<%= render ValidatedFieldComponent.new(
form: f,
hint: t('in_person_proofing.form.state_id.address1_hint'),
Expand All @@ -52,7 +37,7 @@
hint: t('in_person_proofing.form.state_id.address2_hint'),
hint_html: { class: ['display-none', 'puerto-rico-extras'] },
input_html: { value: pii[:address2] },
label: capture_secondary_id_enabled ? t('idv.form.address2') : t('idv.form.address2_optional'),
label: t('idv.form.address2'),
label_html: { class: 'usa-label' },
maxlength: 255,
name: :address2,
Expand All @@ -68,19 +53,6 @@
required: true,
) %>

<% unless capture_secondary_id_enabled %>
<%= render ValidatedFieldComponent.new(
collection: us_states_territories,
form: f,
label: t('idv.form.state'),
label_html: { class: 'usa-label' },
name: :state,
prompt: t('in_person_proofing.form.address.state_prompt'),
required: true,
selected: pii[:state],
) %>
<% end %>

<div class="tablet:grid-col-6">
<%# using :tel for mobile numeric keypad %>
<%= render ValidatedFieldComponent.new(
Expand All @@ -96,22 +68,6 @@
) %>
</div>

<% unless capture_secondary_id_enabled %>
<%= render ValidatedFieldComponent.new(
as: :radio_buttons,
checked: pii[:same_address_as_id],
collection: [
[t('in_person_proofing.form.address.same_address_choice_yes'), true],
[t('in_person_proofing.form.address.same_address_choice_no'), false],
],
form: f,
label: t('in_person_proofing.form.address.same_address'),
name: :same_address_as_id,
required: true,
wrapper: :uswds_radio_buttons,
) %>
<% end %>

<%= f.submit class: 'margin-top-1' do %>
<% if updating_address %>
<%= t('forms.buttons.submit.update') %>
Expand Down
11 changes: 0 additions & 11 deletions app/views/idv/in_person/ready_to_verify/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,6 @@
<% c.with_item(heading: t('in_person_proofing.process.state_id.heading')) do %>
<p><%= t('in_person_proofing.process.state_id.info') %></p>
<% end %>
<% if @presenter.needs_proof_of_address? %>
<% c.with_item(heading: t('in_person_proofing.process.proof_of_address.heading')) do %>
<p class="margin-bottom-105"><%= t('in_person_proofing.process.proof_of_address.info') %></p>
<ul class="usa-list margin-y-105">
<% t('in_person_proofing.process.proof_of_address.acceptable_proof').each do |proof| %>
<li><%= proof %></li>
<% end %>
</ul>
<p><%= t('in_person_proofing.process.proof_of_address.physical_or_digital_copy') %></p>
<% end %>
<% end %>
<% end %>
<p class="margin-bottom-0">
<%= t('in_person_proofing.body.barcode.questions') %>
Expand Down
Loading