diff options
author | Abyss777 <abyss@fox5.ru> | 2016-08-23 15:15:37 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-08-23 15:15:37 +0500 |
commit | f6484e9808f50aa997f028f9421b05aad6aed8bd (patch) | |
tree | 775a0a0bcf6c5b121185011b7d2cdf652eaaf54f /web/app/view/SettingsMenuController.js | |
parent | 21bf1014e55ab8049e18ee991c6ee80b23d1789c (diff) | |
download | trackermap-server-f6484e9808f50aa997f028f9421b05aad6aed8bd.tar.gz trackermap-server-f6484e9808f50aa997f028f9421b05aad6aed8bd.tar.bz2 trackermap-server-f6484e9808f50aa997f028f9421b05aad6aed8bd.zip |
- Hid some buttons and menu items from readonly user
- Removed unused variable
Diffstat (limited to 'web/app/view/SettingsMenuController.js')
-rw-r--r-- | web/app/view/SettingsMenuController.js | 10 |
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 () { |