mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added support for user notification.
This commit is contained in:
parent
696c842899
commit
c081a22016
11 changed files with 108 additions and 23 deletions
|
@ -423,6 +423,8 @@ function createMeshCore(agent) {
|
|||
tunnel.on('error', function (e) { sendConsoleText('ERROR: ' + JSON.stringify(e)); });
|
||||
tunnel.sessionid = data.sessionid;
|
||||
tunnel.rights = data.rights;
|
||||
tunnel.consent = data.consent;
|
||||
tunnel.username = data.username;
|
||||
tunnel.state = 0;
|
||||
tunnel.url = xurl;
|
||||
tunnel.protocol = 0;
|
||||
|
@ -706,6 +708,11 @@ function createMeshCore(agent) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Perform notification if needed
|
||||
if (this.httprequest.consent && (this.httprequest.consent & 2)) {
|
||||
require('toaster').Toast('MeshCentral', this.httprequest.username + ' started a remote terminal session.');
|
||||
}
|
||||
|
||||
// Remote terminal using native pipes
|
||||
if (process.platform == "win32")
|
||||
{
|
||||
|
@ -759,14 +766,16 @@ function createMeshCore(agent) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Perform notification if needed
|
||||
if (this.httprequest.consent && (this.httprequest.consent & 1)) {
|
||||
require('toaster').Toast('MeshCentral', this.httprequest.username + ' started a remote desktop session.');
|
||||
}
|
||||
|
||||
// Remote desktop using native pipes
|
||||
this.httprequest.desktop = { state: 0, kvm: mesh.getRemoteDesktopStream(), tunnel: this };
|
||||
this.httprequest.desktop.kvm.parent = this.httprequest.desktop;
|
||||
this.desktop = this.httprequest.desktop;
|
||||
|
||||
// Display a toast message
|
||||
//require('toaster').Toast('MeshCentral', 'Remote Desktop Control Started.');
|
||||
|
||||
this.end = function () {
|
||||
--this.desktop.kvm.connectionCount;
|
||||
|
||||
|
@ -811,6 +820,11 @@ function createMeshCore(agent) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Perform notification if needed
|
||||
if (this.httprequest.consent && (this.httprequest.consent & 4)) {
|
||||
require('toaster').Toast('MeshCentral', this.httprequest.username + ' started a remote file access.');
|
||||
}
|
||||
|
||||
// Setup files
|
||||
// NOP
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue