aboutsummaryrefslogtreecommitdiff
path: root/web/app/view
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view')
-rw-r--r--web/app/view/DevicesController.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/app/view/DevicesController.js b/web/app/view/DevicesController.js
index c29854d12..8c6c72725 100644
--- a/web/app/view/DevicesController.js
+++ b/web/app/view/DevicesController.js
@@ -33,6 +33,12 @@ Ext.define('Traccar.view.DevicesController', {
}
}
},
+ init: function () {
+ var readonly = Traccar.app.getServer().get('readonly') && !Traccar.app.getUser().get('admin');
+ this.lookupReference('toolbarAddButton').setVisible(!readonly);
+ this.lookupReference('toolbarEditButton').setVisible(!readonly);
+ this.lookupReference('toolbarRemoveButton').setVisible(!readonly);
+ },
onAddClick: function () {
var device, dialog;