';
++count;
}
@@ -6335,10 +6335,10 @@
function p20showAddMeshUserDialog() {
if (xxdialogMode) return;
- var x = "Allow a user to manage this device group and devices in this group.";
+ var x = "Allow users to manage this device group and devices in this group.";
if (features & 0x00080000) { x += " Users need to login to this server once before they can be added to a device group." }
x += "
";
- x += addHtmlValue('User Name', '');
+ x += addHtmlValue('User Names', '');
x += '
';
x += 'Full Administrator ';
x += 'Edit Device Group ';
@@ -6355,14 +6355,16 @@
x += 'Wake Devices ';
x += 'Edit Device Notes ';
x += '
';
- setDialogMode(2, "Add User to Device Group", 3, p20showAddMeshUserDialogEx, x);
+ setDialogMode(2, "Add Users to Device Group", 3, p20showAddMeshUserDialogEx, x);
p20validateAddMeshUserDialog();
Q('dp20username').focus();
}
function p20validateAddMeshUserDialog() {
var meshrights = currentMesh.links[userinfo._id].rights;
- QE('idx_dlgOkButton', (Q('dp20username').value.length > 0));
+ var ok = true, users = Q('dp20username').value.split(',');
+ for (var i in users) { var user = users[i].trim(); if (user.length == 0) { ok = false; } else if (user.indexOf('"') >= 0) { ok = false; } }
+ QE('idx_dlgOkButton', ok);
QE('p20fulladmin', meshrights == 0xFFFFFFFF);
QE('p20editmesh', (!Q('p20fulladmin').checked) && (meshrights == 0xFFFFFFFF));
QE('p20manageusers', !Q('p20fulladmin').checked);
@@ -6396,7 +6398,10 @@
if (Q('p20noamt').checked == true) meshadmin += 2048;
if (Q('p20remotelimitedinput').checked == true) meshadmin += 4096;
}
- meshserver.send({ action: 'addmeshuser', meshid: currentMesh._id, meshname: currentMesh.name, username: Q('dp20username').value , meshadmin: meshadmin});
+
+ var users = Q('dp20username').value.split(','), users2 = [];
+ for (var i in users) { users2.push(users[i].trim()); }
+ meshserver.send({ action: 'addmeshuser', meshid: currentMesh._id, meshname: currentMesh.name, usernames: users2, meshadmin: meshadmin });
}
function p20viewuser(userid) {
@@ -6421,9 +6426,9 @@
r = r.substring(2);
if (r == '') { r = 'No Rights'; }
var uname = userid.split('/')[2];
- if (users) { uname = users[userid].name; }
+ if (users && users[userid]) { uname = users[userid].name; }
if (userinfo._id == userid) { uname = userinfo.name; }
- var buttons = 1, x = addHtmlValue('User Name', EscapeHtml(uname));
+ var buttons = 1, x = addHtmlValue('User Name', EscapeHtml(decodeURIComponent(uname)));
if (userid.split('/')[2] != uname) { x += addHtmlValue('User Identifier', EscapeHtml(userid.split('/')[2])); }
x += addHtmlValue('Permissions', r);
@@ -6431,9 +6436,15 @@
setDialogMode(2, "Device Group User", buttons, p20viewuserEx, x, userid);
}
- function p20viewuserEx(button, userid) { if (button != 2) return; setDialogMode(2, "Remote Mesh User", 3, p20viewuserEx2, "Confirm removal of user " + userid.split('/')[2] + "?", userid); }
+ function p20viewuserEx(button, userid) {
+ if (button != 2) return;
+ var uname = userid.split('/')[2];
+ if (users && users[userid]) { uname = users[userid].name; }
+ if (userinfo._id == userid) { uname = userinfo.name; }
+ setDialogMode(2, "Remote Mesh User", 3, p20viewuserEx2, "Confirm removal of user " + EscapeHtml(decodeURIComponent(uname)) + "?", userid);
+ }
function p20deleteUser(e, userid) { haltEvent(e); p20viewuserEx(2, decodeURIComponent(userid)); }
- function p20viewuserEx2(button, userid) { meshserver.send({ action: 'removemeshuser', meshid: currentMesh._id, meshname: currentMesh.name, userid: userid}); }
+ function p20viewuserEx2(button, userid) { meshserver.send({ action: 'removemeshuser', meshid: currentMesh._id, meshname: currentMesh.name, userid: userid }); }
//
// MY FILES
diff --git a/views/login-min.handlebars b/views/login-min.handlebars
index 178df2bf..af98f830 100644
--- a/views/login-min.handlebars
+++ b/views/login-min.handlebars
@@ -1 +1 @@
- {{{title}}} - Login
{{{title}}}
{{{title2}}}
♦
Welcome
Connect to your home or office devices from anywhere in the world using MeshCentral, the real time, open source remote monitoring and management web site. You will need to download and install a management agent on your computers. Once installed, computers will show up in the "My Devices" section of this web site and you will be able to monitor them and take control of them.
X
\ No newline at end of file
+ {{{title}}} - Login
{{{title}}}
{{{title2}}}
♦
Welcome
Connect to your home or office devices from anywhere in the world using MeshCentral, the real time, open source remote monitoring and management web site. You will need to download and install a management agent on your computers. Once installed, computers will show up in the "My Devices" section of this web site and you will be able to monitor them and take control of them.
X
\ No newline at end of file
diff --git a/views/login-mobile-min.handlebars b/views/login-mobile-min.handlebars
index caea329c..190add60 100644
--- a/views/login-mobile-min.handlebars
+++ b/views/login-mobile-min.handlebars
@@ -1 +1 @@
- MeshCentral - Login
{{{title}}}
{{{title2}}}
X
\ No newline at end of file
+ MeshCentral - Login
{{{title}}}
{{{title2}}}
X
\ No newline at end of file
diff --git a/views/login-mobile.handlebars b/views/login-mobile.handlebars
index ced35c6d..96f0f010 100644
--- a/views/login-mobile.handlebars
+++ b/views/login-mobile.handlebars
@@ -391,7 +391,7 @@
function validateCreate(box,e) {
setDialogMode(0);
- var ok = ((Q('ausername').value.length > 0) && (Q('ausername').value.indexOf(' ') == -1) && (validateEmail(Q('aemail').value) == true) && (Q('apassword1').value.length > 0) && (Q('apassword2').value == Q('apassword1').value));
+ var ok = ((Q('ausername').value.length > 0) && (Q('ausername').value.indexOf('"') == -1) && (Q('ausername').value.indexOf(',') == -1) && (Q('ausername').value.indexOf(' ') == -1) && (validateEmail(Q('aemail').value) == true) && (Q('apassword1').value.length > 0) && (Q('apassword2').value == Q('apassword1').value));
if ((newAccountPass == 1) && (Q('anewaccountpass').value.length == 0)) { ok = false; }
if (Q('apassword1').value == '') {
QH('passWarning', '');
diff --git a/views/login.handlebars b/views/login.handlebars
index 238a09e0..3e63cc33 100644
--- a/views/login.handlebars
+++ b/views/login.handlebars
@@ -402,7 +402,7 @@
function validateCreate(box, e) {
setDialogMode(0);
- var userok = (Q('ausername').value.length > 0) && (Q('ausername').value.indexOf(' ') == -1);
+ var userok = (Q('ausername').value.length > 0) && (Q('ausername').value.indexOf(' ') == -1) && (Q('ausername').value.indexOf('"') == -1) && (Q('ausername').value.indexOf(',') == -1);
var emailok = (validateEmail(Q('aemail').value) == true);
var pass1ok = (Q('apassword1').value.length > 0);
var pass2ok = (Q('apassword2').value.length > 0) && (Q('apassword2').value == Q('apassword1').value);