mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 06:42:32 -05:00
adjust kba
This commit is contained in:
1 parent
1c8f7b0316
commit
e5e4965f05
2 files changed
+22
-10
No files matched your search
@@ -267,7 +267,10 @@ module Submissions
|
||||
|
||||
is_id_verified = submission_events.any?(&:complete_verification?)
|
||||
|
||||
is_kba_passed = submission_events.any?(&:complete_kba?)
|
||||
complete_kba_event = submission_events.find(&:complete_kba?) || SubmissionEvent.new
|
||||
|
||||
kba_answers = complete_kba_event.data['answers']
|
||||
kba_score = " (#{kba_answers['correct']}/#{kba_answers['asked']})" if kba_answers
|
||||
|
||||
info_rows = [
|
||||
[
|
||||
@@ -297,8 +300,8 @@ module Submissions
|
||||
is_id_verified && {
|
||||
text: "#{I18n.t('identity_verification')}: #{I18n.t('verified')}\n"
|
||||
},
|
||||
is_kba_passed && {
|
||||
text: "#{I18n.t('knowledge_based_authentication')}: #{I18n.t('passed')}\n"
|
||||
complete_kba_event.persisted? && {
|
||||
text: "#{I18n.t('knowledge_based_authentication')}: #{I18n.t('passed')}#{kba_score}\n"
|
||||
},
|
||||
completed_event.data['ip'] && { text: "IP: #{completed_event.data['ip']}\n" },
|
||||
completed_event.data['sid'] && { text: "#{I18n.t('session_id')}: #{completed_event.data['sid']}\n" },
|
||||
|
||||
Reference in new issue
Block a user