mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Add page for security keys with stubbed data
This adds a new platform admin settings row, leading a page which shows any existing keys and allows a new one to be registered. Until the APIs for this are implemented, the user API client just returns some stubbed data for manual testing. This also includes a basic JavaScript module to do the main work of registering a new authenticator, to be implemented in the next commits. Some more minor notes: - Setting the headings in the mapping_table is necessary to get the horizontal rule along the top (to match the design). - Setting caption to False in the mapping_table is necessary to stop an extra margin appearing at the top.
This commit is contained in:
@@ -45,6 +45,14 @@
|
||||
{{ edit_field('Change', url_for('.user_profile_password')) }}
|
||||
{% endcall %}
|
||||
|
||||
{% if current_user.platform_admin %}
|
||||
{% call row(id='security-keys') %}
|
||||
{{ text_field('Security keys') }}
|
||||
{{ text_field(current_user.webauthn_credentials|length) }}
|
||||
{{ edit_field('Change', url_for('.user_profile_security_keys')) }}
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
|
||||
{% if current_user.platform_admin or session.get('disable_platform_admin_view') %}
|
||||
{% call row() %}
|
||||
{{ text_field('Use platform admin view') }}
|
||||
|
||||
Reference in New Issue
Block a user