Skip to content
Snippets Groups Projects
Commit d98b179e authored by sandeepsajan0's avatar sandeepsajan0
Browse files

update url namespace for admin disable two factor

parent 3d4a1b50
No related branches found
No related tags found
No related merge requests found
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<!-- Add a custom button to user account edit form --> <!-- Add a custom button to user account edit form -->
{% user_2fa_enabled user as is_2fa_enabled %} {% user_2fa_enabled user as is_2fa_enabled %}
{% if 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 %} {% else %}
<button type="button" title="{% trans "This account do not have 2FA enabled." %}" class="button" disabled>{% trans "Disable 2FA" %}</button> <button type="button" title="{% trans "This account do not have 2FA enabled." %}" class="button" disabled>{% trans "Disable 2FA" %}</button>
{% endif %} {% endif %}
......
...@@ -89,7 +89,7 @@ urlpatterns = [ ...@@ -89,7 +89,7 @@ urlpatterns = [
path('two_factor/required/', TWOFARequiredMessageView.as_view(), name='two_factor_required'), 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/backup_tokens/password/', TWOFABackupTokensPasswordView.as_view(), name='backup_tokens_password'),
path('two_factor/disable/', TWOFADisableView.as_view(), name='disable'), 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/done/', EmailChangeDoneView.as_view(), name="confirm_link_sent"),
path('confirmation/<uidb64>/<token>/', EmailChangeConfirmationView.as_view(), name="confirm_email"), path('confirmation/<uidb64>/<token>/', EmailChangeConfirmationView.as_view(), name="confirm_email"),
path('activate/', create_password, name="activate_password"), path('activate/', create_password, name="activate_password"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment