diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-01-18 09:32:54 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-18 09:32:54 +1300 |
commit | 6171c7275a32c3ad9653aafaf673ab93254c8d1a (patch) | |
tree | 49828903f03061e2f72fc35130055927c8a346fc /web/app/view/SettingsMenuController.js | |
parent | 4d092d96d6d872096abaf2f9883d2b578c5c8f72 (diff) | |
parent | 75828393fd64389be296c95bc67144b0c742cf48 (diff) | |
download | trackermap-web-6171c7275a32c3ad9653aafaf673ab93254c8d1a.tar.gz trackermap-web-6171c7275a32c3ad9653aafaf673ab93254c8d1a.tar.bz2 trackermap-web-6171c7275a32c3ad9653aafaf673ab93254c8d1a.zip |
Merge pull request #385 from Abyss777/manager
Implement user management
Diffstat (limited to 'web/app/view/SettingsMenuController.js')
-rw-r--r-- | web/app/view/SettingsMenuController.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/web/app/view/SettingsMenuController.js b/web/app/view/SettingsMenuController.js index 2f1685f0..1f5907d1 100644 --- a/web/app/view/SettingsMenuController.js +++ b/web/app/view/SettingsMenuController.js @@ -1,5 +1,5 @@ /* - * Copyright 2015 - 2016 Anton Tananaev (anton@traccar.org) + * Copyright 2015 - 2017 Anton Tananaev (anton@traccar.org) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,15 +35,18 @@ Ext.define('Traccar.view.SettingsMenuController', { ], init: function () { - var admin, readonly; + var admin, manager, readonly; admin = Traccar.app.getUser().get('admin'); + manager = Traccar.app.getUser().get('userLimit') > 0; readonly = Traccar.app.getPreference('readonly', false); if (admin) { this.lookupReference('settingsServerButton').setHidden(false); - this.lookupReference('settingsUsersButton').setHidden(false); this.lookupReference('settingsStatisticsButton').setHidden(false); this.lookupReference('settingsDeviceDistanceButton').setHidden(false); } + if (admin || manager) { + this.lookupReference('settingsUsersButton').setHidden(false); + } if (admin || !readonly) { this.lookupReference('settingsGroupsButton').setHidden(false); this.lookupReference('settingsGeofencesButton').setHidden(false); |