From 4578cd87ec14a413bf2275caff5b8be93bfb9ca3 Mon Sep 17 00:00:00 2001 From: hkernbach Date: Thu, 19 May 2016 17:39:13 +0200 Subject: [PATCH] bugfixes --- .../aardvark/APP/frontend/js/views/dashboardView.js | 2 +- .../aardvark/APP/frontend/js/views/loginView.js | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/dashboardView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/dashboardView.js index 2068c86914..edd0c0f0ee 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/dashboardView.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/dashboardView.js @@ -957,7 +957,7 @@ $(this.el).html(this.template.render()); } - if (!enabled || clusterFrontend.db !== '_system') { + if (!enabled || frontendConfig.db !== '_system') { $(this.el).html(''); if (this.server) { $(this.el).append( diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/loginView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/loginView.js index fc10d68ebf..d32df9b827 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/loginView.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/loginView.js @@ -31,14 +31,17 @@ $('#loginUsername').focus(); } else { + var url = arangoHelper.databaseUrl("/_api/database/user"); + if (frontendConfig.authenticationEnabled === false) { $('#logout').hide(); $('.login-window #databases').css('height', '90px'); } + $('#loginForm').hide(); $('.login-window #databases').show(); - $.ajax(arangoHelper.databaseUrl("/_api/database/")).success(function(data) { + $.ajax(url).success(function(data) { //enable db select and login button $('#loginDatabase').html(''); //fill select with allowed dbs @@ -95,10 +98,16 @@ ); } else { + var url = arangoHelper.databaseUrl("/_api/database/user", '_system'); + + if (frontendConfig.authenticationEnabled === false) { + url = arangoHelper.databaseUrl("/_api/database/user"); + } + $('.wrong-credentials').hide(); self.loggedIn = true; //get list of allowed dbs - $.ajax(arangoHelper.databaseUrl("/_api/database/user")).success(function(data) { + $.ajax(url).success(function(data) { $('#loginForm').hide(); $('#databases').show();