aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/SettingsMenuController.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/SettingsMenuController.js')
-rw-r--r--web/app/view/SettingsMenuController.js9
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 () {