fix: 修复用户username 中文 登录失败问题 (#11692)

Co-authored-by: feng <1304903146@qq.com>
pull/11696/head
fit2bot 1 year ago committed by GitHub
parent 42bdb2cf14
commit 10363dcc5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -310,12 +310,6 @@ class UserLoginGuardView(mixins.AuthMixin, RedirectView):
age = self.request.session.get_expiry_age()
self.request.session.set_expiry(age)
def get(self, request, *args, **kwargs):
response = super().get(request, *args, **kwargs)
if request.user.is_authenticated:
response.set_cookie('jms_username', request.user.username)
return response
def get_redirect_url(self, *args, **kwargs):
try:
user = self.get_user_from_session()

Loading…
Cancel
Save