aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-10-12 14:55:56 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-10-12 14:55:56 +1300
commitd15fa5e2316b62884e48830c6c0bacb54ed1cd52 (patch)
tree6de86cf54dc07f8751552d8cda2493ddb6bc1d2e
parent32a04766f2c42fd575c3aeab6141635fcb53509f (diff)
downloadtrackermap-web-d15fa5e2316b62884e48830c6c0bacb54ed1cd52.tar.gz
trackermap-web-d15fa5e2316b62884e48830c6c0bacb54ed1cd52.tar.bz2
trackermap-web-d15fa5e2316b62884e48830c6c0bacb54ed1cd52.zip
Restrict access to computed attributes (AC-2018-10-8-1)
-rw-r--r--web/app/view/SettingsMenuController.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/web/app/view/SettingsMenuController.js b/web/app/view/SettingsMenuController.js
index 37e0634c..fdc1e538 100644
--- a/web/app/view/SettingsMenuController.js
+++ b/web/app/view/SettingsMenuController.js
@@ -45,6 +45,8 @@ Ext.define('Traccar.view.SettingsMenuController', {
if (admin) {
this.lookupReference('settingsServerButton').setHidden(false);
this.lookupReference('settingsStatisticsButton').setHidden(false);
+ this.lookupReference('settingsComputedAttributesButton').setHidden(
+ Traccar.app.getBooleanAttributePreference('ui.disableComputedAttributes'));
}
if (admin || manager) {
this.lookupReference('settingsUsersButton').setHidden(false);
@@ -62,10 +64,6 @@ Ext.define('Traccar.view.SettingsMenuController', {
this.lookupReference('settingsMaintenancesButton').setHidden(
Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableMaintenances'));
}
- if (admin || !deviceReadonly && !readonly) {
- this.lookupReference('settingsComputedAttributesButton').setHidden(
- Traccar.app.getBooleanAttributePreference('ui.disableComputedAttributes'));
- }
},
onUserClick: function () {