aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/SettingsMenuController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-08-24 14:55:06 +1200
committerGitHub <noreply@github.com>2016-08-24 14:55:06 +1200
commitea0bdea88003f46fd6f6164d5c45e33d53f47c81 (patch)
treed8e51a10e56f7e916cc2bf7486d75c90feb5696e /web/app/view/SettingsMenuController.js
parenta645eb8e2338f11e2c807045b1787a47cd1f1464 (diff)
parentf6484e9808f50aa997f028f9421b05aad6aed8bd (diff)
downloadtrackermap-server-ea0bdea88003f46fd6f6164d5c45e33d53f47c81.tar.gz
trackermap-server-ea0bdea88003f46fd6f6164d5c45e33d53f47c81.tar.bz2
trackermap-server-ea0bdea88003f46fd6f6164d5c45e33d53f47c81.zip
Merge pull request #2242 from Abyss777/users_cache
Implement users cache
Diffstat (limited to 'web/app/view/SettingsMenuController.js')
-rw-r--r--web/app/view/SettingsMenuController.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/web/app/view/SettingsMenuController.js b/web/app/view/SettingsMenuController.js
index 45b159ccb..ebaa7007d 100644
--- a/web/app/view/SettingsMenuController.js
+++ b/web/app/view/SettingsMenuController.js
@@ -30,10 +30,18 @@ Ext.define('Traccar.view.SettingsMenuController', {
],
init: function () {
- if (Traccar.app.getUser().get('admin')) {
+ var admin, readonly;
+ admin = Traccar.app.getUser().get('admin');
+ readonly = Traccar.app.getServer().get('readonly');
+ if (admin) {
this.lookupReference('settingsServerButton').setHidden(false);
this.lookupReference('settingsUsersButton').setHidden(false);
}
+ if (admin || !readonly) {
+ this.lookupReference('settingsGroupsButton').setHidden(false);
+ this.lookupReference('settingsGeofencesButton').setHidden(false);
+ this.lookupReference('settingsNotificationsButton').setHidden(false);
+ }
},
onUserClick: function () {