diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-01-28 17:51:10 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-28 17:51:10 +1300 |
commit | d1dd9f84e819d70154861ac2487f902da12885ed (patch) | |
tree | 01a8be83810df3722e86d5c7182e96c075d0a215 /web/app/view/UsersController.js | |
parent | b32387fe01dafc1e85509c8e5312831d9cd0aef2 (diff) | |
parent | aec5f5b0f0b00492742919358a9aaa03e72e3a5b (diff) | |
download | etbsa-traccar-web-d1dd9f84e819d70154861ac2487f902da12885ed.tar.gz etbsa-traccar-web-d1dd9f84e819d70154861ac2487f902da12885ed.tar.bz2 etbsa-traccar-web-d1dd9f84e819d70154861ac2487f902da12885ed.zip |
Merge pull request #390 from Abyss777/permissions_polishing
Improve permissions
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 8aaa839..68e49f8 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(); |