Skip to content

LG-11698 Write that selfie check was performed in user's profile#9858

Merged
theabrad merged 4 commits intomainfrom
abrad-lg-11698-idv-selfie-profile-save
Jan 5, 2024
Merged

LG-11698 Write that selfie check was performed in user's profile#9858
theabrad merged 4 commits intomainfrom
abrad-lg-11698-idv-selfie-profile-save

Conversation

@theabrad
Copy link
Contributor

@theabrad theabrad commented Jan 4, 2024

🎫 Ticket

LG-11698

🛠 Summary of changes

We added the ability to write if a selfie check was performed to profiles to determine if they have proofed with a selfie.

📜 Testing Plan

  • In application.yml, set doc_auth_selfie_capture_enabled: true
  • Starting from sample SP, sign in with biometric_comparison_required
  • Complete IdV
  • Open up the rails console locally
  • Enter u = User.find_with_email("EMAIL")
  • Confirm that u.profiles.first.idv_level = "unsupervised_with_selfie"

changelog: Internal, IdV, save selfie status to user profile

Co-authored-by: Sonia Connolly <sonia.connolly@gsa.gov>
@theabrad theabrad requested a review from a team January 4, 2024 23:04
def set_idv_level(in_person_verification_needed:, selfie_check_performed:)
if in_person_verification_needed
:legacy_in_person
elsif selfie_check_enabled && selfie_check_performed
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use the new FeatureManagement method here instead of creating a new one for selfie_check_enabled?

Suggested change
elsif selfie_check_enabled && selfie_check_performed
elsif !FeatureManagement.idv_block_biometrics_requests? && selfie_check_performed

allow(load_result).to receive(:attention_with_barcode?).and_return(false)

allow(load_result).to receive(:success?).and_return(load_result_success)
allow(load_result).to receive(:selfie_check_performed).and_return(selfie_check_performed)
Copy link
Contributor

Choose a reason for hiding this comment

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

Recommend returning false in this mock, and then you don't need the let that was added above.

Suggested change
allow(load_result).to receive(:selfie_check_performed).and_return(selfie_check_performed)
allow(load_result).to receive(:selfie_check_performed).and_return(false)

Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

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

LGTM! Tested locally and with Alex, works as expected.

@theabrad theabrad merged commit b33dc15 into main Jan 5, 2024
@theabrad theabrad deleted the abrad-lg-11698-idv-selfie-profile-save branch January 5, 2024 19:44
@amirbey amirbey mentioned this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants