소스 검색

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

Ying Chen 6 년 전
부모
커밋
71041937c7
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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'):