aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/UsersController.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-01-24 18:41:27 +0500
committerAbyss777 <abyss@fox5.ru>2017-01-26 11:42:25 +0500
commit048065b76ac3528a8fa802367aa2750c22487f6c (patch)
treec84414b2421b906d970d2a22549249629700f025 /web/app/view/UsersController.js
parent6171c7275a32c3ad9653aafaf673ab93254c8d1a (diff)
downloadetbsa-traccar-web-048065b76ac3528a8fa802367aa2750c22487f6c.tar.gz
etbsa-traccar-web-048065b76ac3528a8fa802367aa2750c22487f6c.tar.bz2
etbsa-traccar-web-048065b76ac3528a8fa802367aa2750c22487f6c.zip
- Polish permissions
- Makeup imports
Diffstat (limited to 'web/app/view/UsersController.js')
-rw-r--r--web/app/view/UsersController.js6
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();