mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 23:15:01 +03:00
MeshCtrl.js devicesharing improvements.
This commit is contained in:
parent
335ca7881f
commit
1aacef0b52
10
meshctrl.js
10
meshctrl.js
@ -1870,7 +1870,6 @@ function serverConnect() {
|
||||
case 'addusertousergroup':
|
||||
case 'removeuserfromusergroup':
|
||||
case 'removeDeviceShare':
|
||||
case 'createDeviceShareLink':
|
||||
case 'userbroadcast': { // BROADCAST
|
||||
if ((settings.cmd == 'shell') || (settings.cmd == 'upload') || (settings.cmd == 'download')) return;
|
||||
if ((settings.multiresponse != null) && (settings.multiresponse > 1)) { settings.multiresponse--; break; }
|
||||
@ -1882,6 +1881,15 @@ function serverConnect() {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'createDeviceShareLink':
|
||||
if (data.result == 'OK') {
|
||||
if (data.publicid) { console.log('ID: ' + data.publicid); }
|
||||
console.log('URL: ' + data.url);
|
||||
} else {
|
||||
console.log(data.result);
|
||||
}
|
||||
process.exit();
|
||||
break;
|
||||
case 'createInviteLink':
|
||||
if (data.responseid == 'meshctrl') {
|
||||
if (data.url) { console.log(data.url); }
|
||||
|
@ -4718,6 +4718,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
var url = 'https://' + serverName + ':' + httpsPort + '/' + xdomain + 'sharing?c=' + inviteCookie;
|
||||
if (serverName.split('.') == 1) { url = '/' + xdomain + page + '?c=' + inviteCookie; }
|
||||
command.url = url;
|
||||
command.publicid = publicid;
|
||||
if (command.responseid != null) { command.result = 'OK'; }
|
||||
try { ws.send(JSON.stringify(command)); } catch (ex) { }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user