From d15fa5e2316b62884e48830c6c0bacb54ed1cd52 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 12 Oct 2018 14:55:56 +1300 Subject: Restrict access to computed attributes (AC-2018-10-8-1) --- web/app/view/SettingsMenuController.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'web') 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 () { -- cgit v1.2.3