mirror of https://github.com/jumpserver/jumpserver
[Update] 修改预留/auth/login/页面方式(admin=1);解决luna页面刷新不跳转openid认证的问题 (#2634)
parent
b7ad6cfe62
commit
3a3da94468
|
@ -59,6 +59,11 @@ class UserLoginView(FormView):
|
|||
return redirect(redirect_user_first_login_or_index(
|
||||
request, self.redirect_field_name)
|
||||
)
|
||||
# show jumpserver login page if request http://{JUMP-SERVER}/?admin=1
|
||||
if settings.AUTH_OPENID and not self.request.GET.get('admin', 0):
|
||||
query_string = request.GET.urlencode()
|
||||
login_url = "{}?{}".format(settings.LOGIN_URL, query_string)
|
||||
return redirect(login_url)
|
||||
request.session.set_test_cookie()
|
||||
return super().get(request, *args, **kwargs)
|
||||
|
||||
|
|
Loading…
Reference in New Issue