1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Completed remote desktop server view only option.

This commit is contained in:
Ylian Saint-Hilaire 2021-07-17 23:03:44 -07:00
parent 198268709e
commit 3599021a66
6 changed files with 15 additions and 9 deletions

View file

@ -905,6 +905,9 @@ function CreateMeshRelayEx2(parent, ws, req, domain, user, cookie) {
obj.req = req; // Used in multi-server.js
obj.viewOnly = ((cookie != null) && (cookie.vo == 1)); // set view only mode
// If the domain has remote desktop viewonly set, force everyone to be in viewonly mode.
if ((typeof domain.desktop == 'object') && (domain.desktop.viewonly == true)) { obj.viewOnly = true; }
// Setup traffic accounting
if (parent.trafficStats.desktopMultiplex == null) { parent.trafficStats.desktopMultiplex = { connections: 1, sessions: 0, in: 0, out: 0 }; } else { parent.trafficStats.desktopMultiplex.connections++; }
ws._socket.bytesReadEx = 0;