Skip to content

Commit

Permalink
Restrict access to computed attributes (AC-2018-10-8-1)
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Oct 12, 2018
1 parent 32a0476 commit d15fa5e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions web/app/view/SettingsMenuController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 () {
Expand Down

0 comments on commit d15fa5e

Please sign in to comment.