Added option to disable local record/screenshot options, #2901.
Ylian Saint-Hilaire committed
Jul 14, 2021 at 09:53 UTC
b2df4de6493cbedb224b46eb5e2d5b1b7e0feec7
3 files changed
+4
-2
meshcentral-config-schema.json
+1
@@ -643,6 +643,7 @@
643
},
644
"httpHeaders": { "type": "object", "additionalProperties": { "type": "string" } },
645
"agentConfig": { "type": "array", "uniqueItems": true, "items": { "type": "string" } },
646
+ "localSessionRecording": { "type": "boolean", "default": true, "description": "When false, removes the local recording feature on remote desktop." },
647
"sessionRecording": {
648
"type": "object",
649
"additionalProperties": false,
views/default.handlebars
+2
-2
@@ -7721,8 +7721,8 @@
7721
if (deskState != 3) { QV('DeskInputLockedButton', false); QV('DeskInputUnLockedButton', false); }
7722
7723
// Display this only if we have Chat & Notify permissions
7724
- QV('DeskSaveImageButton', (deskState == 3) && (Q('Desk')['toBlob'] != null));
7725
- QV('DeskRecordButton', (deskState == 3) && (Q('Desk')['toBlob'] != null) && (desktop.m.StartRecording != null));
7724
+ QV('DeskSaveImageButton', (deskState == 3) && (Q('Desk')['toBlob'] != null) && ((features2 & 0x400) == 0));
7725
+ QV('DeskRecordButton', (deskState == 3) && (Q('Desk')['toBlob'] != null) && (desktop.m.StartRecording != null) && ((features2 & 0x400) == 0));
7726
QV('DeskChatButton', ((rights & 16384) != 0) && (browserfullscreen == false) && (inputAllowed) && (currentNode.agent) && online);
7727
QV('DeskNotifyButton', ((rights & 16384) != 0) && (browserfullscreen == false) && (currentNode.agent) && (currentNode.agent.id < 5) && (inputAllowed) && (currentNode.agent) && online);
7728
QV('DeskLockButton', ((rights & 16384) != 0) && (browserfullscreen == false) && (currentNode.agent) && (currentNode.agent.id < 5) && (inputAllowed) && (currentNode.agent) && (deskState == 3));
webserver.js
+1
@@ -2694,6 +2694,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
2694
if ((typeof domain.passwordrequirements != 'object') || (domain.passwordrequirements.logintokens != false)) { features2 += 0x00000080; } // Indicates login tokens are allowed
2695
if (req.session.loginToken != null) { features2 += 0x00000100; } // LoginToken mode, no account changes.
2696
if (domain.ssh == true) { features2 += 0x00000200; } // SSH is enabled
2697
+ if (domain.localsessionrecording === false) { features2 += 0x00000400; } // Disable local recording feature
2698
2699
// Create a authentication cookie
2700
const authCookie = obj.parent.encodeCookie({ userid: dbGetFunc.user._id, domainid: domain.id, ip: req.clientIp }, obj.parent.loginCookieEncryptionKey);