mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-27 15:45:53 -05:00
Fixed web app exception when going to view a user.
This commit is contained in:
parent
6bf09cb682
commit
08071b7540
@ -487,7 +487,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td style=width:20px></td>
|
<td style=width:20px></td>
|
||||||
<td style=width:200px;vertical-align:top;position:relative valign=top>
|
<td style=width:200px;vertical-align:top;position:relative valign=top>
|
||||||
<img id="p10deviceNotify" onclick=showDeviceSessions() class=deviceNotifyLargeDot src=images/icon-relay-notify-40.png width=40 height=40>
|
<img id="p10deviceNotify" onclick=showDeviceSessions(null,null,event) class=deviceNotifyLargeDot src=images/icon-relay-notify-40.png width=40 height=40>
|
||||||
<a href=# onclick=p10showiconselector()><img id=MainComputerImage></a>
|
<a href=# onclick=p10showiconselector()><img id=MainComputerImage></a>
|
||||||
<div id=MainComputerState></div>
|
<div id=MainComputerState></div>
|
||||||
</td>
|
</td>
|
||||||
@ -3177,9 +3177,9 @@
|
|||||||
var devNotify = '';
|
var devNotify = '';
|
||||||
if (node.sessions != null) {
|
if (node.sessions != null) {
|
||||||
if (view == 2) {
|
if (view == 2) {
|
||||||
devNotify = '<img onclick=showDeviceSessions(\'' + node._id + '\') class=deviceNotifySmallDot src=images/icon-relay-notify10.png width=10 height=10>';
|
devNotify = '<img onclick=showDeviceSessions(\'' + node._id + '\',null,event) class=deviceNotifySmallDot src=images/icon-relay-notify10.png width=10 height=10>';
|
||||||
} else {
|
} else {
|
||||||
devNotify = '<img onclick=showDeviceSessions(\'' + node._id + '\') class=deviceNotifyDot src=images/icon-relay-notify.png width=16 height=16>';
|
devNotify = '<img onclick=showDeviceSessions(\'' + node._id + '\',null,event) class=deviceNotifyDot src=images/icon-relay-notify.png width=16 height=16>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3426,11 +3426,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Show currently active sessions on this device
|
// Show currently active sessions on this device
|
||||||
function showDeviceSessions(nodeid, force) {
|
function showDeviceSessions(nodeid, force, e) {
|
||||||
if (xxdialogMode && !force) return;
|
if (e) haltEvent(e);
|
||||||
|
if (xxdialogMode && !force) return false;
|
||||||
var node = null, x = '';
|
var node = null, x = '';
|
||||||
if (nodeid == null) { node = currentNode; } else { node = getNodeFromId(nodeid); }
|
if (nodeid == null) { node = currentNode; } else { node = getNodeFromId(nodeid); }
|
||||||
if ((node == null) || (node.sessions == null)) { setDialogMode(0); return; }
|
if ((node == null) || (node.sessions == null)) { setDialogMode(0); return false; }
|
||||||
for (var i in node.sessions) {
|
for (var i in node.sessions) {
|
||||||
if ((i == 'kvm') && (node.sessions.multidesk == null)) {
|
if ((i == 'kvm') && (node.sessions.multidesk == null)) {
|
||||||
x += '<u>' + "Remote Desktop" + '</u>';
|
x += '<u>' + "Remote Desktop" + '</u>';
|
||||||
@ -3447,6 +3448,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (x != '') setDialogMode(2, "Sessions" + ' - ' + EscapeHtml(node.name), 1, null, x, 'SESSIONS-' + node._id);
|
if (x != '') setDialogMode(2, "Sessions" + ' - ' + EscapeHtml(node.name), 1, null, x, 'SESSIONS-' + node._id);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleCollapseGroup(id, id2, type) {
|
function toggleCollapseGroup(id, id2, type) {
|
||||||
@ -10964,7 +10966,7 @@
|
|||||||
if (userAdminRights) { x += '<a href=# style=cursor:pointer onclick=\'return p30showDeleteUserDialog()\' title="' + "Remove this user" + '">' + "Delete User" + '</a>'; }
|
if (userAdminRights) { x += '<a href=# style=cursor:pointer onclick=\'return p30showDeleteUserDialog()\' title="' + "Remove this user" + '">' + "Delete User" + '</a>'; }
|
||||||
x += '</div><div style=font-size:x-small>';
|
x += '</div><div style=font-size:x-small>';
|
||||||
// If user admin rights and not SSPI/LDAP and UserID does not start with ~, show change password
|
// If user admin rights and not SSPI/LDAP and UserID does not start with ~, show change password
|
||||||
if (userAdminRights && ((features & 0x00080000) == 0) && (userid.split('/')[2][0] != '~')) { x += '<a href=# style=cursor:pointer onclick=\'return p30showUserChangePassDialog(' + multiFactor + ')\' title="' + "Change the password for this user" + '">' + "Change Password" + '</a>'; }
|
if (userAdminRights && ((features & 0x00080000) == 0) && (user._id.split('/')[2][0] != '~')) { x += '<a href=# style=cursor:pointer onclick=\'return p30showUserChangePassDialog(' + multiFactor + ')\' title="' + "Change the password for this user" + '">' + "Change Password" + '</a>'; }
|
||||||
x += '</div><br>'
|
x += '</div><br>'
|
||||||
QH('p30html3', x);
|
QH('p30html3', x);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user