diff options
Diffstat (limited to 'web/app/view/UsersController.js')
-rw-r--r-- | web/app/view/UsersController.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/web/app/view/UsersController.js b/web/app/view/UsersController.js index 8aaa8397..68e49f83 100644 --- a/web/app/view/UsersController.js +++ b/web/app/view/UsersController.js @@ -40,6 +40,12 @@ Ext.define('Traccar.view.UsersController', { onAddClick: function () { var user, dialog; user = Ext.create('Traccar.model.User'); + if (Traccar.app.getUser().get('admin')) { + user.set('deviceLimit', -1); + } + if (Traccar.app.getUser().get('expirationTime')) { + user.set('expirationTime', Traccar.app.getUser().get('expirationTime')); + } dialog = Ext.create('Traccar.view.UserDialog'); dialog.down('form').loadRecord(user); dialog.show(); |