Explorar o código

HUE-8829 [core] Fix redirect stops at /hue/accounts/login

Ying Chen %!s(int64=6) %!d(string=hai) anos
pai
achega
71041937c7
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      desktop/core/src/desktop/auth/views.py

+ 2 - 0
desktop/core/src/desktop/auth/views.py

@@ -171,6 +171,8 @@ def dt_login(request, from_modal=False):
         ensure_home_directory(request.fs, request.user)
       except (IOError, WebHdfsException), e:
         LOG.error('Could not create home directory for %s user %s.' % ('OIDC' if 'OIDCBackend' in backend_names else 'SAML', request.user))
+    if request.user.is_authenticated():
+      return HttpResponseRedirect(redirect_to)
 
   if is_active_directory and not is_ldap_option_selected and \
                   request.method == 'POST' and request.user.username != request.POST.get('username'):