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

Added way to use cookies only once, added desktopPrivacyBarText option in domain.

This commit is contained in:
Ylian Saint-Hilaire 2019-12-11 15:44:10 -08:00
parent efd936315d
commit bdf51e1200
6 changed files with 153 additions and 20 deletions

View file

@ -88,6 +88,7 @@ module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie
command.consent = mesh.consent; // Add user consent
if (typeof domain.userconsentflags == 'number') { command.consent |= domain.userconsentflags; } // Add server required consent flags
command.username = user.name; // Add user name
if (typeof domain.desktopprivacybartext == 'string') { command.privacybartext = domain.desktopprivacybartext; } // Privacy bar text
delete command.nodeid; // Remove the nodeid since it's implyed.
agent.send(JSON.stringify(command));
return true;
@ -105,6 +106,7 @@ module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie
command.consent = mesh.consent; // Add user consent
if (typeof domain.userconsentflags == 'number') { command.consent |= domain.userconsentflags; } // Add server required consent flags
command.username = user.name; // Add user name
if (typeof domain.desktopprivacybartext == 'string') { command.privacybartext = domain.desktopprivacybartext; } // Privacy bar text
parent.parent.multiServer.DispatchMessageSingleServer(command, routing.serverid);
return true;
}