Add email auth platform admin toggle

also added tests to check visibility, url, and button content
This commit is contained in:
Leo Hemsted
2017-10-27 11:44:40 +01:00
parent 0ea68f9c6d
commit 151605180a
3 changed files with 80 additions and 2 deletions

View File

@@ -261,6 +261,11 @@
{% endif %}
</li>
{% endif %}
<li class="bottom-gutter">
<a href="{{ url_for('.service_switch_email_auth', service_id=current_service.id) }}" class="button">
{{ 'Stop email auth' if 'email_auth' in current_service.permissions else 'Allow email auth' }}
</a>
</li>
{% if current_service.active %}
<li class="bottom-gutter">
<a href="{{ url_for('.archive_service', service_id=current_service.id) }}" class="button">
@@ -272,8 +277,7 @@
Suspend service
</a>
</li>
{% endif %}
{% if not current_service.active %}
{% else %}
<li class="bottom-gutter">
<a href="{{ url_for('.resume_service', service_id=current_service.id) }}" class="button">
Resume service