From edc80b5704d69d7893a977652cd63fd17a9676e5 Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Wed, 25 May 2022 09:44:00 +0200 Subject: [PATCH] authenticators: hide empty kebab menu for password authenticator (#65477) --- .../authentic2/authenticators/authenticator_detail.html | 2 ++ tests/test_manager_authenticators.py | 1 + 2 files changed, 3 insertions(+) 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..a47aa3e7c 100644 --- a/src/authentic2/apps/authenticators/templates/authentic2/authenticators/authenticator_detail.html +++ b/src/authentic2/apps/authenticators/templates/authentic2/authenticators/authenticator_detail.html @@ -4,7 +4,9 @@ {% block appbar %} {{ block.super }} + {% if not object.internal %} + {% endif %} {{ object.enabled|yesno:_("Disable,Enable") }} {% trans "Edit" %} diff --git a/tests/test_manager_authenticators.py b/tests/test_manager_authenticators.py index 3cbbd0eb0..7b34c56f8 100644 --- a/tests/test_manager_authenticators.py +++ b/tests/test_manager_authenticators.py @@ -43,6 +43,7 @@ def test_authenticators_password(app, superuser): assert 'Click "Edit" to change configuration.' in resp.text # cannot delete password authenticator assert 'Delete' not in resp.text + assert 'extra-actions-menu-opener' not in resp.text app.get('/manage/authenticators/1/delete/', status=403) resp = resp.click('Edit') -- 2.30.2