From d98b179eeb801774ecdc7a8215ad3fc1aeea0b6a Mon Sep 17 00:00:00 2001 From: sandeepsajan0 <sandeepsajan0@gmail.com> Date: Fri, 13 May 2022 09:03:08 +0530 Subject: [PATCH] update url namespace for admin disable two factor --- hypha/apply/users/templates/wagtailusers/users/edit.html | 2 +- hypha/apply/users/urls.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hypha/apply/users/templates/wagtailusers/users/edit.html b/hypha/apply/users/templates/wagtailusers/users/edit.html index 6ee179e89..6acd9e295 100644 --- a/hypha/apply/users/templates/wagtailusers/users/edit.html +++ b/hypha/apply/users/templates/wagtailusers/users/edit.html @@ -51,7 +51,7 @@ <!-- Add a custom button to user account edit form --> {% user_2fa_enabled user as is_2fa_enabled %} {% if is_2fa_enabled %} - <a href="{% url 'users:two_factor_reset' user.pk %}" class="button">{% trans "Disable 2FA" %}</a> + <a href="{% url 'users:admin_disable' user.pk %}" class="button">{% trans "Disable 2FA" %}</a> {% else %} <button type="button" title="{% trans "This account do not have 2FA enabled." %}" class="button" disabled>{% trans "Disable 2FA" %}</button> {% endif %} diff --git a/hypha/apply/users/urls.py b/hypha/apply/users/urls.py index ac4a14231..2fd5ff936 100644 --- a/hypha/apply/users/urls.py +++ b/hypha/apply/users/urls.py @@ -89,7 +89,7 @@ urlpatterns = [ path('two_factor/required/', TWOFARequiredMessageView.as_view(), name='two_factor_required'), path('two_factor/backup_tokens/password/', TWOFABackupTokensPasswordView.as_view(), name='backup_tokens_password'), path('two_factor/disable/', TWOFADisableView.as_view(), name='disable'), - path('two_factor/admin/disable/<str:user_id>/', TWOFAAdminDisableView.as_view(), name='two_factor_reset'), + path('two_factor/admin/disable/<str:user_id>/', TWOFAAdminDisableView.as_view(), name='admin_disable'), path('confirmation/done/', EmailChangeDoneView.as_view(), name="confirm_link_sent"), path('confirmation/<uidb64>/<token>/', EmailChangeConfirmationView.as_view(), name="confirm_email"), path('activate/', create_password, name="activate_password"), -- GitLab