Skip to content

Allow using StepIndicatorConcern w/o IdvSession#8480

Merged
matthinz merged 4 commits intomainfrom
matthinz/step-indicator-concern
May 25, 2023
Merged

Allow using StepIndicatorConcern w/o IdvSession#8480
matthinz merged 4 commits intomainfrom
matthinz/step-indicator-concern

Conversation

@matthinz
Copy link
Copy Markdown
Contributor

@matthinz matthinz commented May 24, 2023

If the user is not logged in and does not have an idv_session available (as is the case in the hybrid document capture flow), StepIndicatorConcern would raise. This prevented us from adding the step indicator to some of the IdV error screens as shown in Figmas.

This updates StepIndicatorConcern to:

  • Guard against current_user being nil
  • Guard against idv_session being unavailable or nil
  • Stop automatically including IdvSession

If the user is not logged in or an idv_session is not available, the concern will assume the user is not in the in-person or gpo flows.

If the user is not logged in and does not have an `idv_session` available (as is the case in the hybrid document capture flow), this code would raise and the user would get a 500 error.

This update makes an assumption that if the user is not properly logged in they are probably not in the gpo or in person flow.

[skip changelog]
@matthinz matthinz requested a review from a team May 24, 2023 19:34
matthinz and others added 3 commits May 24, 2023 14:26
Co-authored-by: Sonia Connolly <sonia.connolly@gsa.gov>
These controllers previously included IdvSession via StepIndicatorConcern.
Copy link
Copy Markdown
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

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