Skip to content

LG-13820 Redirect from request letter controller when letter send is not available#10945

Merged
jmhooper merged 1 commit intomainfrom
jmhooper-do-not-allow-request-letter-controller-when-sends-not-allowed
Jul 16, 2024
Merged

LG-13820 Redirect from request letter controller when letter send is not available#10945
jmhooper merged 1 commit intomainfrom
jmhooper-do-not-allow-request-letter-controller-when-sends-not-allowed

Conversation

@jmhooper
Copy link
Contributor

This commit fixes a bug where the RequestLetterController was not respecting GpoVerifyByMailPolicy#send_letter_available?. If that method returned false then links would be hidden but users could still visit the controller directly and request letters.

This commit adds a before action to fix the issue and adds tests.

…not availble

This commit fixes a bug where the `RequestLetterController` was not respecting `GpoVerifyByMailPolicy#send_letter_available?`. If that method returned false then links would be hidden but users could still visit the controller directly and request letters.

This commit adds a before action to fix the issue and adds tests.

[skip changelog]
@jmhooper jmhooper requested a review from a team July 16, 2024 18:22
@jmhooper jmhooper changed the title LG-13820 Redirect form request letter controller when letter send is not available LG-13820 Redirect from request letter controller when letter send is not available Jul 16, 2024
Copy link
Contributor

@matthinz matthinz left a comment

Choose a reason for hiding this comment

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

LGTM

@matthinz matthinz self-requested a review July 16, 2024 18:40
next_steps: [:enter_password],
preconditions: ->(idv_session:, user:) do
idv_session.verify_info_step_complete? || user.gpo_verification_pending_profile?
idv_session.verify_info_step_complete?
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume that this is not required here because you're not using the request letter controller any more if you come back in a new session and request a resend?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this should have been removed in #10866

@jmhooper jmhooper merged commit a377632 into main Jul 16, 2024
@jmhooper jmhooper deleted the jmhooper-do-not-allow-request-letter-controller-when-sends-not-allowed branch July 16, 2024 20:03
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