' + "No users with special device permissions" + '
'; }
@@ -8549,6 +8570,15 @@
var y = '';
for (var i in usergroups) { if ((currentMesh.links == null) || (currentMesh.links[i] == null)) { y += ''; } }
x += addHtmlValue("User Group", '');
+ } else if (userid === 6) {
+ if (usergroups == null) return;
+ var y = '';
+ if (selected == null) {
+ for (var i in usergroups) { if ((currentNode.links == null) || (currentNode.links[i] == null)) { y += ''; } }
+ } else {
+ y += '';
+ }
+ x += addHtmlValue("User Group", '');
} else if (userid === 3) {
var y = '';
for (var i in meshes) { if ((currentUserGroup.links == null) || (currentUserGroup.links[i] == null)) { y += ''; } }
@@ -8578,7 +8608,7 @@
}
}
x += '
';
- if ((userid != 4) && (userid != 5)) {
+ if ((userid != 4) && (userid != 5) && (userid != 6)) {
x += ' ';
x += ' ';
x += ' ';
@@ -8637,6 +8667,28 @@
if (urights & 32768) { Q('p20uninstall').checked = true; }
}
Q('dp20username').focus();
+ } else if (userid === 6) {
+ setDialogMode(2, selected?"Edit User Device Permissions":"Add User Device Permissions", 3, p20showAddMeshUserDialogEx, x, userid);
+ if (selected != null) {
+ selected = decodeURIComponent(selected);
+ var urights = currentNode.links[selected].rights;
+ if (urights & 8) {
+ Q('p20remotecontrol').checked = true;
+ if (urights & 65536) { Q('p20nodesktop').checked = true; }
+ if (urights & 256) { Q('p20remoteview').checked = true; }
+ if (urights & 512) { Q('p20noterminal').checked = true; }
+ if (urights & 1024) { Q('p20nofiles').checked = true; }
+ if (urights & 2048) { Q('p20noamt').checked = true; }
+ if (urights & 4096) { Q('p20remotelimitedinput').checked = true; }
+ }
+ if (urights & 16) { Q('p20meshagentconsole').checked = true; }
+ if (urights & 32) { Q('p20meshserverfiles').checked = true; }
+ if (urights & 64) { Q('p20wakedevices').checked = true; }
+ if (urights & 128) { Q('p20editnotes').checked = true; }
+ if (urights & 8192) { Q('p20limitevents').checked = true; }
+ if (urights & 16384) { Q('p20chatnotify').checked = true; }
+ if (urights & 32768) { Q('p20uninstall').checked = true; }
+ }
} else {
if (userid.startsWith('ugrp/')) {
setDialogMode(2, "Edit Device Group Permissions", 7, p20showAddMeshUserDialogEx, x, userid);
@@ -8816,6 +8868,9 @@
var users = Q('dp20username').value.split(','), users2 = [];
for (var i in users) { users2.push(users[i].trim()); }
meshserver.send({ action: 'adddeviceuser', nodeid: currentNode._id, nodename: currentNode.name, usernames: users2, rights: meshadmin });
+ } else if (t === 6) {
+ var ugrpid = decodeURIComponent(Q('dp2groupid').value);
+ if (currentNode != null) { meshserver.send({ action: 'adddeviceuser', nodeid: currentNode._id, nodename: currentNode.name, userids: [ ugrpid ], rights: meshadmin }); }
} else {
if (t == null) {
var users = Q('dp20username').value.split(','), users2 = [];
@@ -10124,6 +10179,31 @@
if (count == 1) { x += '