1
0
Fork 0
This commit is contained in:
hkernbach 2016-05-19 17:39:13 +02:00
parent ff0e7dc984
commit 4578cd87ec
2 changed files with 12 additions and 3 deletions

View File

@ -957,7 +957,7 @@
$(this.el).html(this.template.render()); $(this.el).html(this.template.render());
} }
if (!enabled || clusterFrontend.db !== '_system') { if (!enabled || frontendConfig.db !== '_system') {
$(this.el).html(''); $(this.el).html('');
if (this.server) { if (this.server) {
$(this.el).append( $(this.el).append(

View File

@ -31,14 +31,17 @@
$('#loginUsername').focus(); $('#loginUsername').focus();
} }
else { else {
var url = arangoHelper.databaseUrl("/_api/database/user");
if (frontendConfig.authenticationEnabled === false) { if (frontendConfig.authenticationEnabled === false) {
$('#logout').hide(); $('#logout').hide();
$('.login-window #databases').css('height', '90px'); $('.login-window #databases').css('height', '90px');
} }
$('#loginForm').hide(); $('#loginForm').hide();
$('.login-window #databases').show(); $('.login-window #databases').show();
$.ajax(arangoHelper.databaseUrl("/_api/database/")).success(function(data) { $.ajax(url).success(function(data) {
//enable db select and login button //enable db select and login button
$('#loginDatabase').html(''); $('#loginDatabase').html('');
//fill select with allowed dbs //fill select with allowed dbs
@ -95,10 +98,16 @@
); );
} }
else { else {
var url = arangoHelper.databaseUrl("/_api/database/user", '_system');
if (frontendConfig.authenticationEnabled === false) {
url = arangoHelper.databaseUrl("/_api/database/user");
}
$('.wrong-credentials').hide(); $('.wrong-credentials').hide();
self.loggedIn = true; self.loggedIn = true;
//get list of allowed dbs //get list of allowed dbs
$.ajax(arangoHelper.databaseUrl("/_api/database/user")).success(function(data) { $.ajax(url).success(function(data) {
$('#loginForm').hide(); $('#loginForm').hide();
$('#databases').show(); $('#databases').show();