Skip to content

Commit e6785e3

Browse files
committed
[errorlogs] fixed to be global admin only
1 parent 0831b52 commit e6785e3

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

plugins/errorlogs/frontend/public/javascripts/countly.views.js

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*globals $,countlyErrorLogs,countlyGlobal,jQuery,countlyCommon,CountlyHelpers,app,countlyVue,CV */
1+
/*globals $,countlyErrorLogs,countlyGlobal,jQuery,countlyCommon,CountlyHelpers,app,countlyVue,CV,countlyAuth */
22
(function() {
33
var FEATURE_NAME = "errorlogs";
44
var ErrorLogsView = countlyVue.views.create({
@@ -61,14 +61,15 @@
6161
}
6262
}
6363
});
64-
65-
countlyVue.container.registerTab("/manage/logs", {
66-
priority: 1,
67-
route: "#/manage/logs/errorlogs",
68-
component: ErrorLogsView,
69-
title: "Server Logs",
70-
name: "errorlogs",
71-
permission: FEATURE_NAME,
72-
vuex: []
73-
});
64+
if (countlyAuth.validateGlobalAdmin()) {
65+
countlyVue.container.registerTab("/manage/logs", {
66+
priority: 1,
67+
route: "#/manage/logs/errorlogs",
68+
component: ErrorLogsView,
69+
title: "Server Logs",
70+
name: "errorlogs",
71+
permission: FEATURE_NAME,
72+
vuex: []
73+
});
74+
}
7475
})();

0 commit comments

Comments
 (0)