1
0
Fork 0

js/collections/arangoQueries.js

This commit is contained in:
Heiko Kernbach 2014-08-08 14:25:13 +02:00
parent cc440aaaaa
commit d6f62ac834
1 changed files with 9 additions and 3 deletions

View File

@ -6,12 +6,18 @@
window.ArangoQueries = Backbone.Collection.extend({
initialize: function(models, options) {
if (options.activeUser) {
this.activeUser = options.activeUser;
var result;
$.ajax("whoAmI", {async:false}).done(
function(data) {
result = data.name;
}
else {
);
this.activeUser = result;
if (this.activeUser === 0 || this.activeUser === undefined || this.activeUser === null) {
this.activeUser = "root";
}
},
url: '/_api/user/',