mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 05:53:13 -04:00
Format auth_type in a consistent way in the UI
On the ‘find user’ page it says ‘sms_auth’ instead of ‘Text message code’. This commit fixes that, and adds a handy formatter so it’s easier to do the right thing in the future.
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
</nav>
|
||||
|
||||
<h2 class="heading-medium">Authentication</h2>
|
||||
<p class="govuk-body">{{ user.auth_type }}</p>
|
||||
<p class="govuk-body">{{ user.auth_type | format_auth_type }}</p>
|
||||
{% if user.auth_type != 'webauthn_auth' %}
|
||||
<a class="govuk-link govuk-link" href="{{ url_for('main.change_user_auth', user_id=user.id) }}">
|
||||
Change authentication for this user
|
||||
|
||||
@@ -64,13 +64,8 @@
|
||||
{% endif %}
|
||||
{% if current_service.has_permission('email_auth') %}
|
||||
<p class="govuk-body tick-cross-list-hint">
|
||||
{% if user.auth_type == 'sms_auth' %}
|
||||
Signs in with a text message code
|
||||
{% elif user.auth_type == 'email_auth' %}
|
||||
Signs in with an email link
|
||||
{% elif user.auth_type == 'webauthn_auth' %}
|
||||
Signs in with a security key
|
||||
{% endif %}
|
||||
Signs in with
|
||||
{{ user.auth_type | format_auth_type(with_indefinite_article=True) }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user