-
Notifications
You must be signed in to change notification settings - Fork 166
LG-8770 TMX rejected users page #8055
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
dfbf886
add redirect for users with rejected profiles
theabrad 42bfb62
add test in auth controller for fraud review pending redirect
theabrad 58febd3
add controller and view for verify errors
theabrad bc2f747
add fraud_rejection redirects
theabrad 3537968
create verify failure page
theabrad 377757e
add test for verify_errors_controller
theabrad 5510069
add analytics event for verify errors visited
theabrad abe7dc9
add tests to check redirects
theabrad 199c481
add changelong
theabrad 78ec7d5
lints
theabrad 4cf1b51
fraud before actions placed in concern
theabrad e3528a4
move verify_errors to not_verified
theabrad 130c6b7
remove external link and Exit Login.gov
theabrad 5ac718f
add handle fraud before action
theabrad 3c26105
check for fraud in errors controllers
theabrad 89b25e2
remove before actions
theabrad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,34 @@ | ||
| module FraudReviewConcern | ||
| extend ActiveSupport::Concern | ||
|
|
||
| def handle_fraud | ||
| handle_pending_fraud_review | ||
| handle_fraud_rejection | ||
| end | ||
|
|
||
| def handle_pending_fraud_review | ||
| redirect_to_fraud_review if fraud_review_pending? | ||
| end | ||
|
|
||
| def handle_fraud_rejection | ||
| redirect_to_fraud_rejection if fraud_rejection? | ||
| end | ||
|
|
||
| def redirect_to_fraud_review | ||
| redirect_to idv_setup_errors_url | ||
| end | ||
|
|
||
| def redirect_to_fraud_rejection | ||
| redirect_to idv_not_verified_url | ||
| end | ||
|
|
||
| def fraud_review_pending? | ||
| return false unless user_fully_authenticated? | ||
| current_user.fraud_review_pending? | ||
| end | ||
|
|
||
| def fraud_rejection? | ||
| return false unless user_fully_authenticated? | ||
| current_user.fraud_rejection? | ||
| end | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| module Idv | ||
| class NotVerifiedController < ApplicationController | ||
| before_action :confirm_two_factor_authenticated | ||
|
|
||
| def show | ||
| analytics.idv_not_verified_visited | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| <%= render( | ||
| 'idv/shared/error', | ||
| title: t('titles.failure.information_not_verified'), | ||
| heading: t('idv.failure.verify.heading'), | ||
| ) do %> | ||
| <p> | ||
| <% if decorated_session.sp_name.present? %> | ||
| <%= link_to( | ||
| t('idv.failure.verify.fail_link_html', sp_name: decorated_session.sp_name), | ||
| return_to_sp_failure_to_proof_path( | ||
| step: 'verify_info', | ||
| location: request.params[:action], | ||
| ), | ||
| ) %> | ||
| <% else %> | ||
| <%= link_to( | ||
| t('idv.failure.verify.fail_link_html', sp_name: APP_NAME), | ||
| account_path, | ||
| ) %> | ||
| <% end %> | ||
| <%= t('idv.failure.verify.fail_text') %> | ||
| </p> | ||
| <% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| require 'rails_helper' | ||
|
|
||
| describe Idv::NotVerifiedController do | ||
| let(:user) { build_stubbed(:user, :signed_up) } | ||
|
|
||
| before do | ||
| stub_sign_in(user) | ||
| end | ||
|
|
||
| it 'renders the show template' do | ||
| stub_analytics | ||
|
|
||
| expect(@analytics).to receive(:track_event).with( | ||
| 'IdV: Not verified visited', | ||
| ) | ||
|
|
||
| get :show | ||
|
|
||
| expect(response).to render_template :show | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be automatically wired up as a
before_actionif the concern is included:Taking a quick look over where this concern is included, I don't see a downside? We're having a proliferation of controllers under
Idvand it'd be nice for them all to be able to easily redirect users due to being rejected.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idv::SetupErrorsController should get this
before_actionas well--if you refresh the page after being rejected, it should catch that and redirect you to the new messaging.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true. yeah that will fix up some DRY.