Files
notifications-admin/app/templates/views/manage-users/permissions.html
Ben Thorner a1b4ccc246 Prevent auth type changing for any WebAuthn user
Previously we applied this restriction to Platform Admins, on the
assumption that all of them use a security key to log in. Rather
than making that assumption, we can explicitly check their login
method, which also supports rolling out the feature to more users.
2021-07-07 15:04:43 +01:00

28 lines
823 B
HTML

{% from "components/radios.html" import radio, radios, conditional_radio_panel %}
{{ form.permissions_field }}
{% if form.folder_permissions.all_template_folders %}
{{ form.folder_permissions }}
{% elif user and user.platform_admin %}
<p class="bottom-gutter">
Platform admin users can access all template folders.
</p>
{% endif %}
{% if service_has_email_auth %}
{% if user.webauthn_auth %}
<p class="bottom-gutter">
This user will login with a security key.
</p>
{% elif not mobile_number %}
{{ radios(
form.login_authentication,
disable=['sms_auth'],
option_hints={'sms_auth': 'Not available because this team member has not added a phone&nbsp;number to their profile'|safe}
) }}
{% else %}
{{ radios(form.login_authentication) }}
{% endif %}
{% endif %}