Email auth for inviting members and editing permissions

This commit is contained in:
chrisw
2017-11-01 15:36:27 +00:00
parent 756bdd3181
commit c6ea90a7d8
11 changed files with 325 additions and 23 deletions

View File

@@ -63,6 +63,15 @@
user.has_permissions(permissions=['manage_api_keys']),
'Access API keys'
) }}
{% if 'email_auth' in current_service['permissions'] %}
<div class="tick-cross-list-hint">
{% if user.auth_type == 'sms_auth' %}
Signs in with a text message code
{% else %}
Signs in with an email link
{% endif %}
</div>
{% endif %}
</div>
{% if current_user.has_permissions(['manage_users'], admin_override=True) %}
{% if current_user.id != user.id %}
@@ -104,6 +113,15 @@
user.has_permissions(permissions=['manage_api_keys']),
'Access API keys'
) }}
{% if 'email_auth' in current_service['permissions'] %}
<div class="tick-cross-list-hint">
{% if user.auth_type == 'sms_auth' %}
Signs in with a text message code
{% else %}
Signs in with an email link
{% endif %}
</div>
{% endif %}
</div>
<li class="tick-cross-list-edit-link">
{% if user.status == 'pending' and current_user.has_permissions(['manage_users']) %}

View File

@@ -1,4 +1,5 @@
{% from "components/checkbox.html" import checkbox %}
{% from "components/radios.html" import radios %}
<fieldset class="form-group">
<legend class="form-label">
@@ -20,3 +21,7 @@
<li>who the other team members are</li>
</ul>
</div>
{% if service_has_email_auth %}
{{ radios(form.login_authentication, disable=['sms_auth' if user_has_no_mobile_number]) }}
{% endif %}