diff options
author | Abyss777 <abyss@fox5.ru> | 2017-01-24 18:41:27 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-01-26 11:42:25 +0500 |
commit | 048065b76ac3528a8fa802367aa2750c22487f6c (patch) | |
tree | c84414b2421b906d970d2a22549249629700f025 /web/app/view/SettingsMenuController.js | |
parent | 6171c7275a32c3ad9653aafaf673ab93254c8d1a (diff) | |
download | trackermap-web-048065b76ac3528a8fa802367aa2750c22487f6c.tar.gz trackermap-web-048065b76ac3528a8fa802367aa2750c22487f6c.tar.bz2 trackermap-web-048065b76ac3528a8fa802367aa2750c22487f6c.zip |
- Polish permissions
- Makeup imports
Diffstat (limited to 'web/app/view/SettingsMenuController.js')
-rw-r--r-- | web/app/view/SettingsMenuController.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/web/app/view/SettingsMenuController.js b/web/app/view/SettingsMenuController.js index 1f5907d1..5dcc722f 100644 --- a/web/app/view/SettingsMenuController.js +++ b/web/app/view/SettingsMenuController.js @@ -35,10 +35,11 @@ Ext.define('Traccar.view.SettingsMenuController', { ], init: function () { - var admin, manager, readonly; + var admin, manager, readonly, deviceReadonly; admin = Traccar.app.getUser().get('admin'); manager = Traccar.app.getUser().get('userLimit') > 0; readonly = Traccar.app.getPreference('readonly', false); + deviceReadonly = Traccar.app.getUser().get('deviceReadonly'); if (admin) { this.lookupReference('settingsServerButton').setHidden(false); this.lookupReference('settingsStatisticsButton').setHidden(false); @@ -48,11 +49,15 @@ Ext.define('Traccar.view.SettingsMenuController', { this.lookupReference('settingsUsersButton').setHidden(false); } if (admin || !readonly) { + this.lookupReference('settingsUserButton').setHidden(false); this.lookupReference('settingsGroupsButton').setHidden(false); this.lookupReference('settingsGeofencesButton').setHidden(false); - this.lookupReference('settingsAttributeAliasesButton').setHidden(false); + this.lookupReference('settingsNotificationsButton').setHidden(false); this.lookupReference('settingsCalendarsButton').setHidden(false); } + if (admin || (!deviceReadonly && !readonly)) { + this.lookupReference('settingsAttributeAliasesButton').setHidden(false); + } }, onUserClick: function () { |