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

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

Conversation

jmhooper
Copy link
Member

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
Member

@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
@@ -33,7 +34,7 @@ def self.step_info
action: :index,
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
Member

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
Member 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
2 checks passed
@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