From 9407fc0bca943c2f3e28febb43d332ec45821d96 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Sat, 8 Oct 2016 14:19:20 +0200 Subject: [PATCH] 2FA: Allow to delete devices --- .../pretixcontrol/user/2fa_delete.html | 25 +++++++++++++++++ .../pretixcontrol/user/2fa_main.html | 6 ++++- src/pretix/control/urls.py | 2 ++ src/pretix/control/views/user.py | 27 ++++++++++++++++++- 4 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 src/pretix/control/templates/pretixcontrol/user/2fa_delete.html diff --git a/src/pretix/control/templates/pretixcontrol/user/2fa_delete.html b/src/pretix/control/templates/pretixcontrol/user/2fa_delete.html new file mode 100644 index 0000000000..882b29f8ff --- /dev/null +++ b/src/pretix/control/templates/pretixcontrol/user/2fa_delete.html @@ -0,0 +1,25 @@ +{% extends "pretixcontrol/base.html" %} +{% load i18n %} +{% load bootstrap3 %} +{% block title %}{% trans "Delete a two-factor authentication device" %}{% endblock %} +{% block content %} +

{% trans "Delete a two-factor authentication device" %}

+
+ {% csrf_token %} +

{% blocktrans trimmed with device=device.name %} + Are you sure you want to delete the authentication device "{{ device }}"? + {% endblocktrans %}

+

{% trans "You will no longer be able to use this device to log in to pretix." %}

+

+ {% trans "If this is the only device connected to your account, we will disable two-factor authentication." %} +

+
+ + {% trans "Cancel" %} + + +
+
+{% endblock %} diff --git a/src/pretix/control/templates/pretixcontrol/user/2fa_main.html b/src/pretix/control/templates/pretixcontrol/user/2fa_main.html index eb9d0646de..bbb0051a5e 100644 --- a/src/pretix/control/templates/pretixcontrol/user/2fa_main.html +++ b/src/pretix/control/templates/pretixcontrol/user/2fa_main.html @@ -48,7 +48,11 @@