LG-7086-log-whether-account-is-in-reproofing#7279
Conversation
changelog: Improvements, Logging, Log if reproofing for IRS
77b2363 to
17fef57
Compare
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
17fef57 to
a34037e
Compare
| step: current_step, | ||
| step_count: current_flow_step_counts[current_step_name], | ||
| analytics_id: @analytics_id, | ||
| irs_reproofing: current_user&.decorate&.reproof_for_irs?( |
There was a problem hiding this comment.
current_user might not work for the hybrid document capture path (sending a link to a phone), since there's not a true user session in those steps. In other places we'd use effective_user to get the current user or the user associated with the hybrid session. Should we do the same here?
There was a problem hiding this comment.
Will there always be an effective user? Or should we do something like current_user || effective_user?
There was a problem hiding this comment.
effective_user will be the same as current_user if current_user exists.
If current_user doesn't exist, it will be the user associated with a hybrid user if one exists.
If neither of those exist, it will be nil.
You shouldn't have to do current_user || effective_user since effective_user is already handling current_user.
There was a problem hiding this comment.
Cool. Let me update it, that sounds like a good approach.
aduth
left a comment
There was a problem hiding this comment.
One comment, but otherwise LGTM
| analytics_id: @analytics_id, | ||
| irs_reproofing: effective_user&.decorate&.reproof_for_irs?( | ||
| service_provider: current_sp, | ||
| ).present?, |
There was a problem hiding this comment.
Is .present? necessary? Would reproof_from_irs? ever return anything other than true or false?
| ).present?, | |
| ), |
There was a problem hiding this comment.
It can return nil also.
There was a problem hiding this comment.
Oh, reproof_for_irs? wouldn't, but I see now that with the safe navigation it might be possible that effective_user could.
🎫 Ticket
Link to the relevant ticket.
https://cm-jira.usa.gov/browse/LG-7086
🛠 Summary of changes
For the flow, we track if it's a reproof or not.
📜 Testing Plan
Provide a checklist of steps to confirm the changes.
👀 Screenshots
If relevant, include a screenshot or screen capture of the changes.
Before:
After:
🚀 Notes for Deployment
Include any special instructions for deployment.