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

Deploy RC 437 to Production #11614

Merged
merged 14 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Minor refactor of profile handling in EnterPasswordController (#11603)
Return a Profile from Idv::Session::create_profile_from_applicant_with_password, then use that directly in EnterPasswordController.

[skip changelog]
  • Loading branch information
matthinz authored Dec 6, 2024
commit 3523bf5f301bdb2dc92abd01aae53a050cc6f862
7 changes: 4 additions & 3 deletions app/controllers/idv/enter_password_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def confirm_current_password
end

def init_profile
idv_session.create_profile_from_applicant_with_password(
profile = idv_session.create_profile_from_applicant_with_password(
password,
is_enhanced_ipp: resolved_authn_context_result.enhanced_ipp?,
proofing_components: ProofingComponents.new(
Expand All @@ -137,12 +137,13 @@ def init_profile
user_session:,
).to_h,
)
if idv_session.verify_by_mail?

if profile.gpo_verification_pending?
current_user.send_email_to_all_addresses(:verify_by_mail_letter_requested)
log_letter_enqueued_analytics(resend: false)
end

if idv_session.profile.active?
if profile.active?
create_user_event(:account_verified)
UserAlerts::AlertUserAboutAccountVerified.call(
profile: idv_session.profile,
Expand Down
3 changes: 3 additions & 0 deletions app/services/idv/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def respond_to_missing?(method_sym, include_private)
VALID_SESSION_ATTRIBUTES.include?(attr_name_sym) || super
end

# @return [Profile]
def create_profile_from_applicant_with_password(
user_password, is_enhanced_ipp:, proofing_components:
)
Expand Down Expand Up @@ -141,6 +142,8 @@ def create_profile_from_applicant_with_password(
if profile.gpo_verification_pending?
create_gpo_entry(profile_maker.pii_attributes, profile)
end

profile
end

def opt_in_param
Expand Down