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

Started work on per-user session recording. #3064

This commit is contained in:
Ylian Saint-Hilaire 2021-08-26 12:42:09 -07:00
parent 9386ae9a04
commit e6b6bd061e
7 changed files with 92 additions and 25 deletions

View file

@ -3943,9 +3943,21 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
if (domain.sessionrecording == true || ((typeof domain.sessionrecording == 'object') && ((domain.sessionrecording.protocols == null) || (domain.sessionrecording.protocols.indexOf((req.query.p == 2) ? 101 : 100) >= 0)))) { // TODO 100
// Check again if we need to do recording
var record = true;
if (domain.sessionrecording.onlyselecteddevicegroups === true) {
var mesh = obj.meshes[node.meshid];
if ((mesh.flags == null) || ((mesh.flags & 4) == 0)) { record = false; } // Do not record the session
// Check user or device group recording
if ((domain.sessionrecording.onlyselectedusers === true) || (domain.sessionrecording.onlyselecteddevicegroups === true)) {
record = false;
// Check device group recording
if (domain.sessionrecording.onlyselecteddevicegroups === true) {
var mesh = obj.meshes[node.meshid];
if ((mesh.flags != null) && ((mesh.flags & 4) != 0)) { record = true; } // Record the session
}
// Check user recording
if (domain.sessionrecording.onlyselectedusers === true) {
if ((user.flags != null) && ((user.flags & 2) != 0)) { record = true; } // Record the session
}
}
if (record == true) {