mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-23 05:42:13 +03:00
More user groups improvements.
This commit is contained in:
parent
fce364d2ea
commit
fe1079d1f1
@ -53,7 +53,7 @@ var MeshServerCreateControl = function (domain, authCookie) {
|
|||||||
|
|
||||||
obj.send = function (x) {
|
obj.send = function (x) {
|
||||||
if (obj.socket != null && obj.connectstate == 1) {
|
if (obj.socket != null && obj.connectstate == 1) {
|
||||||
if (obj.trace) { console.log('SEND', x); }
|
if (obj.trace && (x.action != 'ping')) { console.log('SEND', x); }
|
||||||
obj.socket.send(JSON.stringify(x));
|
obj.socket.send(JSON.stringify(x));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -915,6 +915,10 @@
|
|||||||
ugroup.links = message.event.links;
|
ugroup.links = message.event.links;
|
||||||
}
|
}
|
||||||
//masterUpdate(8192 + 16384);
|
//masterUpdate(8192 + 16384);
|
||||||
|
|
||||||
|
// Group update, refresh all our device groups and nodes. TODO: Optimize this to only do this when needed.
|
||||||
|
meshserver.send({ action: 'meshes' });
|
||||||
|
meshserver.send({ action: 'nodes' });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'deleteusergroup': {
|
case 'deleteusergroup': {
|
||||||
@ -954,7 +958,7 @@
|
|||||||
meshes[message.event.meshid].links = message.event.links;
|
meshes[message.event.meshid].links = message.event.links;
|
||||||
|
|
||||||
// Check if we lost rights to this mesh in this change.
|
// Check if we lost rights to this mesh in this change.
|
||||||
if (meshes[message.event.meshid].links[userinfo._id] == null) {
|
if (IsMeshViewable(message.event.meshid) == false) {
|
||||||
if ((xxcurrentView == 20) && (currentMesh == meshes[message.event.meshid])) go(2);
|
if ((xxcurrentView == 20) && (currentMesh == meshes[message.event.meshid])) go(2);
|
||||||
delete meshes[message.event.meshid];
|
delete meshes[message.event.meshid];
|
||||||
|
|
||||||
|
@ -2238,6 +2238,10 @@
|
|||||||
if (message.event.links) { ugroup.links = message.event.links; } else { delete ugroup.links; }
|
if (message.event.links) { ugroup.links = message.event.links; } else { delete ugroup.links; }
|
||||||
}
|
}
|
||||||
masterUpdate(8192 + 16384);
|
masterUpdate(8192 + 16384);
|
||||||
|
|
||||||
|
// Group update, refresh all our device groups and nodes. TODO: Optimize this to only do this when needed.
|
||||||
|
meshserver.send({ action: 'meshes' });
|
||||||
|
meshserver.send({ action: 'nodes' });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'deleteusergroup': {
|
case 'deleteusergroup': {
|
||||||
|
Loading…
Reference in New Issue
Block a user