mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed refresh.ashx reload loop, added user consent strings to config.json.
This commit is contained in:
parent
2156b27db2
commit
f8604d5b61
7 changed files with 68 additions and 25 deletions
|
@ -705,6 +705,7 @@ function createMeshCore(agent) {
|
|||
tunnel.state = 0;
|
||||
tunnel.url = xurl;
|
||||
tunnel.protocol = 0;
|
||||
tunnel.soptions = data.soptions;
|
||||
tunnel.tcpaddr = data.tcpaddr;
|
||||
tunnel.tcpport = data.tcpport;
|
||||
tunnel.udpaddr = data.udpaddr;
|
||||
|
@ -1257,7 +1258,9 @@ function createMeshCore(agent) {
|
|||
if (this.httprequest.consent && (this.httprequest.consent & 16))
|
||||
{
|
||||
this.write(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: "Waiting for user to grant access...", msgid: 1 }));
|
||||
this.httprequest.tpromise._consent = require('message-box').create('MeshCentral', this.httprequest.username + " requesting Terminal Access. Grant access?", 30);
|
||||
var consentMessage = this.httprequest.username + " requesting remote terminal access. Grant access?";
|
||||
if ((this.httprequest.soptions != null) && (this.httprequest.soptions.consentMsgTerminal != null)) { consentMessage = this.httprequest.soptions.consentMsgTerminal.replace('{0}', this.httprequest.username); }
|
||||
this.httprequest.tpromise._consent = require('message-box').create('MeshCentral', consentMessage, 30);
|
||||
this.httprequest.tpromise._consent.retPromise = this.httprequest.tpromise;
|
||||
this.httprequest.tpromise._consent.then(
|
||||
function ()
|
||||
|
@ -1605,7 +1608,10 @@ function createMeshCore(agent) {
|
|||
// User Consent Prompt is required
|
||||
// Send a console message back using the console channel, "\n" is supported.
|
||||
this.write(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: "Waiting for user to grant access...", msgid: 1 }));
|
||||
var pr = require('message-box').create('MeshCentral', this.httprequest.username + " requesting KVM Access. Grant access?", 30, null, tsid);
|
||||
var consentMessage = this.httprequest.username + " requesting remote desktop access. Grant access?";
|
||||
if ((this.httprequest.soptions != null) && (this.httprequest.soptions.consentMsgDesktop != null)) { consentMessage = this.httprequest.soptions.consentMsgDesktop.replace('{0}', this.httprequest.username); }
|
||||
sendConsoleText('ConsentMSG: ' + consentMessage);
|
||||
var pr = require('message-box').create('MeshCentral', consentMessage, 30, null, tsid);
|
||||
pr.ws = this;
|
||||
this.pause();
|
||||
this._consentpromise = pr;
|
||||
|
@ -1734,7 +1740,9 @@ function createMeshCore(agent) {
|
|||
// User Consent Prompt is required
|
||||
// Send a console message back using the console channel, "\n" is supported.
|
||||
this.write(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: "Waiting for user to grant access...", msgid: 1 }));
|
||||
var pr = require('message-box').create('MeshCentral', this.httprequest.username + " requesting remote file access. Grant access?", 30);
|
||||
var consentMessage = this.httprequest.username + " requesting remote file Access. Grant access?";
|
||||
if ((this.httprequest.soptions != null) && (this.httprequest.soptions.consentMsgFiles != null)) { consentMessage = this.httprequest.soptions.consentMsgFiles.replace('{0}', this.httprequest.username); }
|
||||
var pr = require('message-box').create('MeshCentral', consentMessage, 30);
|
||||
pr.ws = this;
|
||||
this.pause();
|
||||
this._consentpromise = pr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue