mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-03 18:16:37 +00:00
perf: Remove the login status after the client logs in
This commit is contained in:
parent
931e15173b
commit
49aaf8d53e
@ -9,6 +9,7 @@ import time
|
||||
|
||||
import pyotp
|
||||
from django.conf import settings
|
||||
from django.contrib.auth import logout as auth_logout
|
||||
from django.core.cache import cache
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
@ -74,6 +75,7 @@ def redirect_user_first_login_or_index(request, redirect_field_name):
|
||||
|
||||
if url == 'client':
|
||||
url = get_redirect_client_url(request)
|
||||
auth_logout(request)
|
||||
|
||||
url = safe_next_url(url, request=request)
|
||||
# 防止 next 地址为 None
|
||||
|
Loading…
Reference in New Issue
Block a user