-
Notifications
You must be signed in to change notification settings - Fork 166
LG-6625: Hide IPP troubleshooting option for failures #6597
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
6241e32
Use doc auth result value from document if present
aduth 1b775f5
Include doc_auth_result in async form extra
aduth 9920025
LG-6625: Hide IPP troubleshooting option for failures
aduth d227b92
Merge remote-tracking branch 'origin/main' into aduth-lg-6625-in-pers…
NavaTim ae32e61
LG-6625: Fix and expand coverage for doc auth controller tests
NavaTim c3b96e0
LG-6625: Fix image upload controller tests
NavaTim 03f5897
LG-6625: Remove global config from test
NavaTim 583debd
LG-6625: Fix and expand coverage for image upload response presenter …
NavaTim e84d04d
LG-6625: Expand tests to cover new field for verification form
NavaTim 573538f
LG-6625: Expand tests to cover troubleshooting options change
NavaTim ddeefcc
LG-6625: Add changelog commit
NavaTim f6a29b8
Add specs for explicit mock doc_auth_result control
aduth d165e88
Use code constant for failed
aduth eeda444
Add test case for error isFailedResult
aduth 8990eb5
Use constant names for doc_auth_result_from_success
aduth 17f6e1d
Set PII assertion to exact expected array
aduth 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
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
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 |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ def initialize(uploaded_file, config, liveness_enabled) | |
| errors: errors, | ||
| pii_from_doc: pii_from_doc, | ||
| extra: { | ||
| doc_auth_result: success? ? 'Passed' : 'Caution', | ||
| doc_auth_result: doc_auth_result, | ||
| billed: true, | ||
| }, | ||
| ) | ||
|
|
@@ -78,6 +78,22 @@ def parsed_data_from_uploaded_file | |
| @parsed_data_from_uploaded_file = parse_uri || parse_yaml | ||
| end | ||
|
|
||
| def doc_auth_result | ||
| doc_auth_result_from_uploaded_file || doc_auth_result_from_success | ||
| end | ||
|
|
||
| def doc_auth_result_from_uploaded_file | ||
| parsed_data_from_uploaded_file&.[]('doc_auth_result') | ||
| end | ||
|
Comment on lines
+85
to
+87
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our developer docs specify that a YAML test file can include |
||
|
|
||
| def doc_auth_result_from_success | ||
| if success? | ||
| DocAuth::Acuant::ResultCodes::PASSED.name | ||
| else | ||
| DocAuth::Acuant::ResultCodes::CAUTION.name | ||
| end | ||
| end | ||
|
|
||
| def parse_uri | ||
| uri = URI.parse(uploaded_file.chomp) | ||
| if uri.scheme == 'data' | ||
|
|
||
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
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
Oops, something went wrong.
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.
just want to clarify for myself - is isFailedResult for any id upload failure of for the kind that would not trigger an option for in person proofing (ie barcode can't be read)?
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.
The way it's being treated here is as a "hard failure", meaning that it's a document which was recognized as unacceptable (fraudulent, etc.). This is one of the results which can be returned from our document authentication vendors. It's also distinct from other non-successful results like "unknown" or "attention". The ticket is making it so that we can continue showing the troubleshooting option for certain unsuccessful results (unknown, attention), but not for failures.
identity-idp/app/services/doc_auth/acuant/result_codes.rb
Lines 8 to 19 in 17d7e30