mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 20:03:12 -04:00
Allow platform admins to change user auth in the UI
So we do not have to go into the db when we need to change user auth. We do not allow this for users who use webauthn. We do not want to enable security downgrade for those users.
This commit is contained in:
committed by
Leo Hemsted
parent
8da8b167c9
commit
08f0393553
28
app/templates/views/find-users/auth_type.html
Normal file
28
app/templates/views/find-users/auth_type.html
Normal file
@@ -0,0 +1,28 @@
|
||||
{% extends "views/platform-admin/_base_template.html" %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
|
||||
{% block per_page_title %}
|
||||
Set auth type for {{ user.name }}
|
||||
{% endblock %}
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({ "href": url_for('main.user_information', user_id=user.id) }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-five-sixths">
|
||||
{{ page_header('Set auth type for ' + user.name) }}
|
||||
|
||||
{% call form_wrapper() %}
|
||||
{{ form.auth_type }}
|
||||
{{ page_footer('Save') }}
|
||||
{% endcall %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -13,6 +13,7 @@
|
||||
</h1>
|
||||
<p class="govuk-body">{{ user.email_address }}</p>
|
||||
<p class="{{ '' if user.mobile_number else 'hint' }}">{{ user.mobile_number or 'No mobile number'}}</p>
|
||||
|
||||
<h2 class="heading-medium">Live services</h2>
|
||||
<nav class="browse-list">
|
||||
{% if user.live_services %}
|
||||
@@ -45,6 +46,15 @@
|
||||
</p>
|
||||
{% endif %}
|
||||
</nav>
|
||||
|
||||
<h2 class="heading-medium">Authentication</h2>
|
||||
<p class="govuk-body">{{ user.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
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<h2 class="heading-medium">Last login</h2>
|
||||
{% if not user.logged_in_at %}
|
||||
<p class="hint">This person has never logged in</p>
|
||||
|
||||
Reference in New Issue
Block a user