From 9edba8f96e35b7ee1085fe827d4154f4866e0c81 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Mon, 3 Nov 2014 23:22:08 +0100 Subject: [PATCH] issue #1075: Aardvark: user name required even if auth is off The fix for this prefills the username input field with the current user's accout name if any and `root` (the default username) otherwise. Additionally, the tooltip text has been slightly adjusted. --- CHANGELOG | 10 ++++++++++ js/apps/system/aardvark/frontend/js/routers/router.js | 3 ++- .../system/aardvark/frontend/js/views/databaseView.js | 11 ++++++----- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index ece283765d..8b54b86ddc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,16 @@ v2.3.0 (XXXX-XX-XX) ------------------- +* fixed issue #1075: Aardvark: user name required even if auth is off #1075 + + The fix for this prefills the username input field with the current user's + accout name if any and `root` (the default username) otherwise. Additionally, + the tooltip text has been slightly adjusted. + + +v2.3.0-beta (2014-11-01) +------------------------ + * added dedicated `NOT IN` operator for AQL Previously, a `NOT IN` was only achievable by writing a negated `IN` condition: diff --git a/js/apps/system/aardvark/frontend/js/routers/router.js b/js/apps/system/aardvark/frontend/js/routers/router.js index 992e8d8760..92fe915bd9 100644 --- a/js/apps/system/aardvark/frontend/js/routers/router.js +++ b/js/apps/system/aardvark/frontend/js/routers/router.js @@ -187,8 +187,9 @@ databases: function () { if (arangoHelper.databaseAllowed() === true) { - if (!this.databaseView) { + if (! this.databaseView) { this.databaseView = new window.databaseView({ + users: this.userCollection, collection: new window.ArangoDatabase( [], { diff --git a/js/apps/system/aardvark/frontend/js/views/databaseView.js b/js/apps/system/aardvark/frontend/js/views/databaseView.js index 36a8571113..464cc42944 100644 --- a/js/apps/system/aardvark/frontend/js/views/databaseView.js +++ b/js/apps/system/aardvark/frontend/js/views/databaseView.js @@ -6,6 +6,7 @@ "use strict"; window.databaseView = Backbone.View.extend({ + users: null, el: '#content', template: templateEngine.createTemplate("databaseView.ejs"), @@ -318,10 +319,12 @@ window.modalView.createTextEntry( "newUser", "Username", - "", + this.users !== null ? this.users.whoAmI() : 'root', "Please define the owner of this database. This will be the only user having " - + "initial access to this database. If the user is different to your account " - + "you will not be able to see the database. " + + "initial access to this database if authentication is turned on. Please note " + + "that if you specify a username different to your account you will not be " + + "able to access the database with your account after having creating it. " + + "Specifying a username is mandatory even with authentication turned off. " + "If there is a failure you will be informed.", "Database Owner", true, @@ -357,7 +360,5 @@ ); } - - }); }());