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());
}
if (!enabled || clusterFrontend.db !== '_system') {
if (!enabled || frontendConfig.db !== '_system') {
$(this.el).html('');
if (this.server) {
$(this.el).append(

View File

@ -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();