add no consent to guest sharing

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
Simon Smith 2024-03-01 22:29:59 +00:00 committed by GitHub
parent aa87fd61bb
commit ee59e582b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2100 additions and 2091 deletions

View File

@ -890,7 +890,7 @@ if (args['_'].length == 0) {
console.log(" --add [guestname] - Add a device sharing link.");
console.log(" --type [desktop,terminal,files] - Type of sharing to add, can be combined. default is desktop.");
console.log(" --viewonly - Make desktop sharing view only.");
console.log(" --consent [notify,prompt] - Consent flags, default is notify.");
console.log(" --consent [notify,prompt,none] - Consent flags, default is notify.");
console.log(" --start [yyyy-mm-ddThh:mm:ss] - Start time, default is now.");
console.log(" --end [yyyy-mm-ddThh:mm:ss] - End time.");
console.log(" --duration [minutes] - Duration of the share, default is 60 minutes.");

File diff suppressed because it is too large Load Diff

View File

@ -8272,7 +8272,7 @@
x += addHtmlValue("Start Time", '<input id=d2timeStartSelector style=float:right;width:250px class=flatpickr type="text" placeholder="' + "Select Date & Time..." + '" data-id="altinput">');
x += addHtmlValue("Duration", '<select id=d2inviteDuration style=float:right;width:250px>' + z + '</select>');
x += '</div>';
if (currentNode.agent.caps & 1) { x += '<div id=d2userConsentSelector>' + addHtmlValue("User Consent", '<select id=d2userConsent style=float:right;width:250px><option value=1>' + "Prompt for consent" + '</option><option value=0>' + "Notify Only" + '</option></select>') + '</div>'; }
if (currentNode.agent.caps & 1) { x += '<div id=d2userConsentSelector>' + addHtmlValue("User Consent", '<select id=d2userConsent style=float:right;width:250px><option value=0>' + "Notify Only" + '<option value=1>' + "Prompt for consent" + '</option><option value=2>' + "No Consent" + '</option></select>') + '</div>'; }
x += '<div id=d2httpPortSelector>' + addHtmlValue("Port", '<input id=d2httpPort style=float:right;width:250px value=80 onkeyup=showShareDeviceValidate()></input>') + '</div>';
x += '<div id=d2httpsPortSelector>' + addHtmlValue("Port", '<input id=d2httpsPort style=float:right;width:250px value=443 onkeyup=showShareDeviceValidate()></input>') + '</div>';
setDialogMode(2, "Share Device", 3, showShareDeviceEx, x);
@ -8308,14 +8308,17 @@
if (q & 1) {
consent |= 0x0002; // Terminal notify
if ((currentNode.agent.caps & 1) && (Q('d2userConsent').value == 1)) { consent |= 0x0010; } // Terminal prompt for user consent
if ((currentNode.agent.caps & 1) && (Q('d2userConsent').value == 2)) { consent = 0; } // Terminal with no user consent
}
if (q & 2) {
consent |= 0x0041; // Desktop connection toolbar + Desktop notify
if ((currentNode.agent.caps & 1) && (Q('d2userConsent').value == 1)) { consent |= 0x0008; } // Desktop prompt for user consent
if ((currentNode.agent.caps & 1) && (Q('d2userConsent').value == 2)) { consent = 0; } // Desktop with no user consent
}
if (q & 4) {
consent |= 0x0004; // Files notify
if ((currentNode.agent.caps & 1) && (Q('d2userConsent').value == 1)) { consent |= 0x0020; } // Files prompt for user consent
if ((currentNode.agent.caps & 1) && (Q('d2userConsent').value == 2)) { consent = 0; } // Files prompt for user consent
}
if (Q('d2timeRange').value == 0) {