mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-29 11:23:17 +00:00
fix: 修复用户username 中文 登录失败问题 (#11693)
Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
parent
7a1214f358
commit
a4ff9dace3
@ -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…
Reference in New Issue
Block a user