From 5bacab747544a38802eaf5e89875e93dd4883bbc Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 3 Jun 2020 12:44:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=87=8D=E7=BD=AE=E5=AF=86=E9=92=A5?= =?UTF-8?q?=E5=88=B0auth=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/urls/view_urls.py | 1 + apps/users/utils.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/authentication/urls/view_urls.py b/apps/authentication/urls/view_urls.py index 4bd785a08..12e1fea84 100644 --- a/apps/authentication/urls/view_urls.py +++ b/apps/authentication/urls/view_urls.py @@ -25,6 +25,7 @@ urlpatterns = [ path('password/verify/', users_view.UserVerifyPasswordView.as_view(), name='user-verify-password'), # Profile + path('profile/pubkey/generate/', users_view.UserPublicKeyGenerateView.as_view(), name='user-pubkey-generate'), path('profile/otp/enable/start/', users_view.UserOtpEnableStartView.as_view(), name='user-otp-enable-start'), path('profile/otp/enable/install-app/', users_view.UserOtpEnableInstallAppView.as_view(), name='user-otp-enable-install-app'), diff --git a/apps/users/utils.py b/apps/users/utils.py index 673215146..eb53c6607 100644 --- a/apps/users/utils.py +++ b/apps/users/utils.py @@ -205,8 +205,8 @@ def get_user_or_pre_auth_user(request): def redirect_user_first_login_or_index(request, redirect_field_name): - if request.user.is_first_login: - return reverse('authentication:user-first-login') + # if request.user.is_first_login: + # return reverse('authentication:user-first-login') url_in_post = request.POST.get(redirect_field_name) if url_in_post: return url_in_post