8000 Merge branch 'devel' of github.com:arangodb/arangodb into devel · lethalbrains/arangodb@ae64274 · GitHub
[go: up one dir, main page]

Skip to content

Commit ae64274

Browse files
committed
Merge branch 'devel' of github.com:arangodb/arangodb into devel
2 parents 23d8750 + 3457e7e commit ae64274

File tree

11 files changed

+330
-372
lines changed

11 files changed

+330
-372
lines changed

3rdParty/V8-3.31.74.1/build/gyp/pylib/gyp/xcode_emulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@ def GetCflags(self, configname, arch=None):
375375
if self._Test('GCC_SYMBOLS_PRIVATE_EXTERN', 'YES', default='NO'):
376376
cflags.append('-fvisibility=hidden')
377377

378-
if self._Test('GCC_TREAT_WARNINGS_AS_ERRORS', 'YES', default='NO'):
379-
cflags.append('-Werror')
378+
# if self._Test('GCC_TREAT_WARNINGS_AS_ERRORS', 'YES', default='NO'):
379+
# cflags.append('-Werror')
380380

381381
if self._Test('GCC_WARN_ABOUT_MISSING_NEWLINE', 'YES', default='NO'):
382382
cflags.append('-Wnewline-eof')

js/apps/system/_admin/aardvark/APP/GruntFile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@
309309

310310
grunt.registerTask('default', [
311311
'sass:dev',
312+
'jshint:default',
312313
'replace',
313314
'concat_in_order:sharedLibs',
314315
'concat_in_order:default',

js/apps/system/_admin/aardvark/APP/clusterFrontend/build/cluster.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2439,7 +2439,7 @@ window.StatisticsCollection = Backbone.Collection.extend({
24392439

24402440
//check if user has _system permission
24412441
var authorized = this.options.database.hasSystemAccess();
2442-
if (authorized === undefined) {
2442+
if (!authorized) {
24432443
$('.contentDiv').remove();
24442444
$('.headerBar').remove();
24452445
$('.dashboard-headerbar').remove();

js/apps/system/_admin/aardvark/APP/frontend/js/collections/arangoDatabase.js

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/*jshint browser: true */
2-
/*jshint unused: false */
32
/*global window, Backbone, $, window, _*/
43

54
(function() {
@@ -13,7 +12,7 @@
1312
desc: false
1413
},
1514

16-
shouldFetchUser: false,
15+
url: "/_api/database",
1716

1817
comparator: function(item, item2) {
1918
var a = item.get('name').toLowerCase();
@@ -24,19 +23,6 @@
2423
return a > b ? 1 : a < b ? -1 : 0;
2524
},
2625

27-
sync: function(method, model, options) {
28-
if (method === "read") {
29-
if (this.shouldFetchUser) {
30-
options.url = model.url() + "user";
31-
}
32-
}
33-
return Backbone.sync(method, model, options);
34-
},
35-
36-
url: function() {
37-
return '/_db/_system/_api/database/';
38-
},
39-
4026
parse: function(response) {
4127
if (!response) {
4228
return;
@@ -46,8 +32,7 @@
4632
});
4733
},
4834

49-
initialize: function(values, options) {
50-
this.shouldFetchUser = options.shouldFetchUser;
35+
initialize: function() {
5136
var self = this;
5237
this.fetch().done(function() {
5338
self.sort();
@@ -66,6 +51,25 @@
6651
return this.models;
6752
},
6853

54+
getDatabasesForUser: function() {
55+
var returnVal;
56+
$.ajax({
57+
type: "GET",
58+
cache: false,
59+
url: this.url + "/user",
60+
contentType: "application/json",
61+
processData: false,
62+
async: false,
63+
success: function(data) {
64+
returnVal = data.result;
65+
},
66+
error: function() {
67+
returnVal = [];
68+
}
69+
});
70+
return returnVal.sort();
71+
},
72+
6973
createDatabaseURL: function(name, protocol, port) {
7074
var loc = window.location;
7175
var hash = window.location.hash;
@@ -106,7 +110,7 @@
106110
$.ajax({
107111
type: "GET",
108112
cache: false,
109-
url: "/_api/database/current",
113+
url: this.url + "/current",
110114
contentType: "application/json",
111115
processData: false,
112116
async: false,
@@ -122,6 +126,11 @@
122126
}
123127
});
124128
return returnVal;
129+
},
130+
131+
hasSystemAccess: function() {
132+
var list = this.getDatabasesForUser();
133+
return _.contains(list, "_system");
125134
}
126135
});
127136
}());

js/apps/system/_admin/aardvark/APP/frontend/js/views/dashboardView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@
712712

713713
//check if user has _system permission
714714
var authorized = this.options.database.hasSystemAccess();
715-
if (authorized === undefined) {
715+
if (!authorized) {
716716
$('.contentDiv').remove();
717717
$('.headerBar').remove();
718718
$('.dashboard-headerbar').remove();

0 commit comments

Comments
 (0)
0