diff --git a/js/apps/system/aardvark/frontend/img/arangodblogoAvatar.png b/js/apps/system/aardvark/frontend/img/arangodblogoAvatar.png new file mode 100644 index 0000000000..8ca5632e45 Binary files /dev/null and b/js/apps/system/aardvark/frontend/img/arangodblogoAvatar.png differ diff --git a/js/apps/system/aardvark/frontend/js/collections/arangoUsers.js b/js/apps/system/aardvark/frontend/js/collections/arangoUsers.js index 3179d4b406..e204354f7e 100644 --- a/js/apps/system/aardvark/frontend/js/collections/arangoUsers.js +++ b/js/apps/system/aardvark/frontend/js/collections/arangoUsers.js @@ -1,5 +1,5 @@ /*jslint indent: 2, nomen: true, maxlen: 100, sloppy: true, vars: true, white: true, plusplus: true */ -/*global window, Backbone, $, window */ +/*global window, Backbone, $,_, window */ window.ArangoUsers = Backbone.Collection.extend({ model: window.Users, @@ -71,6 +71,20 @@ window.ArangoUsers = Backbone.Collection.extend({ result.push(object); }); return result; + }, + + whoAmI: function() { + if (this.currentUser) { + return this.currentUser; + } + var result; + $.ajax("whoAmI", {async:false}).done( + function(data) { + result = data.name; + } + ); + this.currentUser = result; + return this.currentUser; } }); diff --git a/js/apps/system/aardvark/frontend/js/templates/userBarView.ejs b/js/apps/system/aardvark/frontend/js/templates/userBarView.ejs index a07f24cc77..bcb584d2fa 100644 --- a/js/apps/system/aardvark/frontend/js/templates/userBarView.ejs +++ b/js/apps/system/aardvark/frontend/js/templates/userBarView.ejs @@ -9,10 +9,24 @@