Skip to content

Jmax/lg 11550 read the correct pii from the session on the verify by mail enter code screen#9658

Merged
jmax-gsa merged 8 commits intomainfrom
jmax/LG-11550-read-the-correct-pii-from-the-session-on-the-verify-by-mail-enter-code-screen
Dec 1, 2023
Merged

Jmax/lg 11550 read the correct pii from the session on the verify by mail enter code screen#9658
jmax-gsa merged 8 commits intomainfrom
jmax/LG-11550-read-the-correct-pii-from-the-session-on-the-verify-by-mail-enter-code-screen

Conversation

@jmax-gsa
Copy link
Contributor

@jmax-gsa jmax-gsa commented Nov 27, 2023

🎫 Ticket

LG-11550

🛠 Summary of changes

Updated very by mail enter code controller to explicitly use PII from the gpo_verification_pending_profile.

📜 Testing Plan

Provide a checklist of steps to confirm the changes.

  • Ensure that the new controller spec at the top of enter_code_controller_spec.rb passes without errors
  • Ensure that all previous specs pass without errors.
  • Add the debug line below to Pii::Cacher#fetch
  • Create a user and go through requesting a verify by mail letter and return to your account page
  • Using the Rails console, identify the user and their profile; make note of their respective IDs
  • Go to the 'enter your code' page and enter the verify by mail code
  • Inspect the Rails logs to verify that the correct profile ID was passed to Pii::Cacher#fetch
# DEBUG CODE
Rails.logger.debug "Pii::Cacher#fetch(#{profile_id.inspect})"

changelog: Internal,IdV,Part of Pii::Cacher update
@jmax-gsa jmax-gsa force-pushed the jmax/LG-11550-read-the-correct-pii-from-the-session-on-the-verify-by-mail-enter-code-screen branch from bd264db to 51fa135 Compare November 27, 2023 15:55
@jmax-gsa jmax-gsa requested a review from a team November 30, 2023 16:19
if rate_limiter.limited?
redirect_to idv_enter_code_rate_limited_url
else
flash[:error] = @gpo_verify_form.errors.first.message if !rate_limiter.limited?
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to get to the code in this else statement if the rate_limiter is limited? Just wondering if the if !rate_limiter.limited? statement is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, because the rate limiter may have been incremented during the form submission.

Copy link
Contributor

@JackRyan1989 JackRyan1989 left a comment

Choose a reason for hiding this comment

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

LGTM

@jmax-gsa jmax-gsa merged commit f8f4789 into main Dec 1, 2023
@jmax-gsa jmax-gsa deleted the jmax/LG-11550-read-the-correct-pii-from-the-session-on-the-verify-by-mail-enter-code-screen branch December 1, 2023 21:01
@solipet solipet mentioned this pull request Dec 5, 2023
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.

3 participants