diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/app/model/User.js | 2 | ||||
-rw-r--r-- | web/app/view/DeviceMenuController.js | 2 | ||||
-rw-r--r-- | web/app/view/SettingsMenuController.js | 2 | ||||
-rw-r--r-- | web/app/view/StateController.js | 2 | ||||
-rw-r--r-- | web/app/view/dialog/DeviceController.js | 2 | ||||
-rw-r--r-- | web/app/view/dialog/User.js | 2 | ||||
-rw-r--r-- | web/app/view/dialog/UserController.js | 4 | ||||
-rw-r--r-- | web/app/view/edit/DevicesController.js | 8 | ||||
-rw-r--r-- | web/app/view/edit/Users.js | 4 | ||||
-rw-r--r-- | web/app/view/edit/UsersController.js | 4 |
10 files changed, 16 insertions, 16 deletions
diff --git a/web/app/model/User.js b/web/app/model/User.js index 5232c9f4..76f2a366 100644 --- a/web/app/model/User.js +++ b/web/app/model/User.js @@ -41,7 +41,7 @@ Ext.define('Traccar.model.User', { name: 'readonly', type: 'boolean' }, { - name: 'admin', + name: 'administrator', type: 'boolean' }, { name: 'map', diff --git a/web/app/view/DeviceMenuController.js b/web/app/view/DeviceMenuController.js index e50b0e0c..f191756c 100644 --- a/web/app/view/DeviceMenuController.js +++ b/web/app/view/DeviceMenuController.js @@ -37,7 +37,7 @@ Ext.define('Traccar.view.DeviceMenuController', { Traccar.app.getBooleanAttributePreference('ui.disableComputedAttributes')); this.lookupReference('menuCommandsButton').setHidden(Traccar.app.getPreference('limitCommands', false)); this.lookupReference('menuDeviceDistanceButton').setHidden( - !Traccar.app.getUser().get('admin') && Traccar.app.getUser().get('userLimit') === 0 || Traccar.app.getVehicleFeaturesDisabled()); + !Traccar.app.getUser().get('administrator') && Traccar.app.getUser().get('userLimit') === 0 || Traccar.app.getVehicleFeaturesDisabled()); this.lookupReference('menuMaintenancesButton').setHidden( Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableMaintenances')); }, diff --git a/web/app/view/SettingsMenuController.js b/web/app/view/SettingsMenuController.js index 56d9cf89..59f62c2e 100644 --- a/web/app/view/SettingsMenuController.js +++ b/web/app/view/SettingsMenuController.js @@ -39,7 +39,7 @@ Ext.define('Traccar.view.SettingsMenuController', { init: function () { var admin, manager, readonly, deviceReadonly; - admin = Traccar.app.getUser().get('admin'); + admin = Traccar.app.getUser().get('administrator'); manager = Traccar.app.getUser().get('userLimit') !== 0; readonly = Traccar.app.getPreference('readonly', false); deviceReadonly = Traccar.app.getUser().get('deviceReadonly'); diff --git a/web/app/view/StateController.js b/web/app/view/StateController.js index 44b01382..6363fc9c 100644 --- a/web/app/view/StateController.js +++ b/web/app/view/StateController.js @@ -53,7 +53,7 @@ Ext.define('Traccar.view.StateController', { init: function () { var i, hideAttributesPreference, attributesList; - if (Traccar.app.getUser().get('admin') || + if (Traccar.app.getUser().get('administrator') || !Traccar.app.getUser().get('deviceReadonly') && !Traccar.app.getPreference('readonly', false)) { this.lookupReference('computedAttributesButton').setDisabled( Traccar.app.getBooleanAttributePreference('ui.disableComputedAttributes')); diff --git a/web/app/view/dialog/DeviceController.js b/web/app/view/dialog/DeviceController.js index d6ddc58b..d7a4493b 100644 --- a/web/app/view/dialog/DeviceController.js +++ b/web/app/view/dialog/DeviceController.js @@ -21,7 +21,7 @@ Ext.define('Traccar.view.dialog.DeviceController', { alias: 'controller.device', init: function () { - if (Traccar.app.getUser().get('admin')) { + if (Traccar.app.getUser().get('administrator')) { this.lookupReference('disabledField').setHidden(false); } } diff --git a/web/app/view/dialog/User.js b/web/app/view/dialog/User.js index 69bbd705..86f91672 100644 --- a/web/app/view/dialog/User.js +++ b/web/app/view/dialog/User.js @@ -115,7 +115,7 @@ Ext.define('Traccar.view.dialog.User', { xtype: 'checkboxfield', inputValue: true, uncheckedValue: false, - name: 'admin', + name: 'administrator', fieldLabel: Strings.userAdmin, disabled: true, reference: 'adminField' diff --git a/web/app/view/dialog/UserController.js b/web/app/view/dialog/UserController.js index 953093ea..7383f9ee 100644 --- a/web/app/view/dialog/UserController.js +++ b/web/app/view/dialog/UserController.js @@ -20,12 +20,12 @@ Ext.define('Traccar.view.dialog.UserController', { alias: 'controller.user', init: function () { - if (Traccar.app.getUser().get('admin')) { + if (Traccar.app.getUser().get('administrator')) { this.lookupReference('adminField').setDisabled(false); this.lookupReference('deviceLimitField').setDisabled(false); this.lookupReference('userLimitField').setDisabled(false); } - if (Traccar.app.getUser().get('admin') || !this.getView().selfEdit) { + if (Traccar.app.getUser().get('administrator') || !this.getView().selfEdit) { this.lookupReference('readonlyField').setDisabled(false); this.lookupReference('disabledField').setDisabled(false); this.lookupReference('expirationTimeField').setDisabled(false); diff --git a/web/app/view/edit/DevicesController.js b/web/app/view/edit/DevicesController.js index a0bf9dc4..2b4ff14f 100644 --- a/web/app/view/edit/DevicesController.js +++ b/web/app/view/edit/DevicesController.js @@ -59,8 +59,8 @@ Ext.define('Traccar.view.edit.DevicesController', { init: function () { var self = this, readonly, deviceReadonly; - deviceReadonly = Traccar.app.getPreference('deviceReadonly', false) && !Traccar.app.getUser().get('admin'); - readonly = Traccar.app.getPreference('readonly', false) && !Traccar.app.getUser().get('admin'); + deviceReadonly = Traccar.app.getPreference('deviceReadonly', false) && !Traccar.app.getUser().get('administrator'); + readonly = Traccar.app.getPreference('readonly', false) && !Traccar.app.getUser().get('administrator'); this.lookupReference('toolbarAddButton').setDisabled(readonly || deviceReadonly); this.lookupReference('toolbarDeviceMenu').setHidden(readonly || deviceReadonly); @@ -98,8 +98,8 @@ Ext.define('Traccar.view.edit.DevicesController', { updateButtons: function (selected) { var readonly, deviceReadonly, empty, deviceMenu; - deviceReadonly = Traccar.app.getPreference('deviceReadonly', false) && !Traccar.app.getUser().get('admin'); - readonly = Traccar.app.getPreference('readonly', false) && !Traccar.app.getUser().get('admin'); + deviceReadonly = Traccar.app.getPreference('deviceReadonly', false) && !Traccar.app.getUser().get('administrator'); + readonly = Traccar.app.getPreference('readonly', false) && !Traccar.app.getUser().get('administrator'); empty = selected.length === 0; this.lookupReference('toolbarEditButton').setDisabled(empty || readonly || deviceReadonly); this.lookupReference('toolbarRemoveButton').setDisabled(empty || readonly || deviceReadonly); diff --git a/web/app/view/edit/Users.js b/web/app/view/edit/Users.js index 3629e825..e2dd9aa6 100644 --- a/web/app/view/edit/Users.js +++ b/web/app/view/edit/Users.js @@ -125,8 +125,8 @@ Ext.define('Traccar.view.edit.Users', { filter: 'string' }, { text: Strings.userAdmin, - dataIndex: 'admin', - renderer: Traccar.AttributeFormatter.getFormatter('admin'), + dataIndex: 'administrator', + renderer: Traccar.AttributeFormatter.getFormatter('administrator'), filter: 'boolean' }, { text: Strings.serverReadonly, diff --git a/web/app/view/edit/UsersController.js b/web/app/view/edit/UsersController.js index f3154b1a..9d998162 100644 --- a/web/app/view/edit/UsersController.js +++ b/web/app/view/edit/UsersController.js @@ -42,7 +42,7 @@ Ext.define('Traccar.view.edit.UsersController', { init: function () { Ext.getStore('Users').load(); - this.lookupReference('userUsersButton').setHidden(!Traccar.app.getUser().get('admin')); + this.lookupReference('userUsersButton').setHidden(!Traccar.app.getUser().get('administrator')); this.lookupReference('userDriversButton').setHidden( Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableDrivers')); this.lookupReference('userAttributesButton').setHidden( @@ -66,7 +66,7 @@ Ext.define('Traccar.view.edit.UsersController', { onAddClick: function () { var user, dialog; user = Ext.create('Traccar.model.User'); - if (Traccar.app.getUser().get('admin')) { + if (Traccar.app.getUser().get('administrator')) { user.set('deviceLimit', -1); } if (Traccar.app.getUser().get('expirationTime')) { |