Browse Source

HUE-4661 [core] Demo backend should keep the admin user logged in

That way if we login as 'hdfs', we don't get relogined as a demo user
on the next page fetch.
Romain Rigaux 9 years ago
parent
commit
ef634ca019
1 changed files with 1 additions and 1 deletions
  1. 1 1
      desktop/core/src/desktop/auth/views.py

+ 1 - 1
desktop/core/src/desktop/auth/views.py

@@ -158,7 +158,7 @@ def dt_login(request, from_modal=False):
     first_user_form = None
     auth_form = AuthenticationForm()
 
-  if DEMO_ENABLED.get() and not 'admin' in request.REQUEST:
+  if DEMO_ENABLED.get() and not 'admin' in request.REQUEST and request.user.username != 'hdfs':
     user = authenticate(username=request.user.username, password='HueRocks')
     login(request, user)
     ensure_home_directory(request.fs, user.username)