From 7ee2705a3b0d8daf4f588be8bf41e1f7a30a859f Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Tue, 24 May 2022 15:44:23 +0200 Subject: [PATCH] authenticators: forbid disabling all authenticators (#65642) --- .../authenticators/authenticator_detail.html | 2 ++ src/authentic2/apps/authenticators/views.py | 7 ++++++- tests/test_manager_authenticators.py | 18 ++++++++++-------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/authentic2/apps/authenticators/templates/authentic2/authenticators/authenticator_detail.html b/src/authentic2/apps/authenticators/templates/authentic2/authenticators/authenticator_detail.html index 54d3d5527..bd4c52d8a 100644 --- a/src/authentic2/apps/authenticators/templates/authentic2/authenticators/authenticator_detail.html +++ b/src/authentic2/apps/authenticators/templates/authentic2/authenticators/authenticator_detail.html @@ -6,7 +6,9 @@ + {% if not object.internal %} {{ object.enabled|yesno:_("Disable,Enable") }} + {% endif %} {% trans "Edit" %}