mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added user group management commands to MeshCtrl.js
This commit is contained in:
parent
31062ccd57
commit
5b1a7045f5
2 changed files with 168 additions and 47 deletions
|
@ -2360,6 +2360,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
}
|
||||
|
||||
// Check if the user exists
|
||||
if (command.userid.startsWith('user/') == false) { command.userid = 'user/' + removeUserDomain.id + '/' + command.userid.toLowerCase(); }
|
||||
var chguser = parent.users[command.userid];
|
||||
if (chguser != null) {
|
||||
var change = false;
|
||||
|
@ -2396,6 +2397,8 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
}
|
||||
}
|
||||
|
||||
if (command.responseid != null) { try { ws.send(JSON.stringify({ action: 'removeuserfromusergroup', responseid: command.responseid, result: 'ok', added: addedCount, failed: failCount })); } catch (ex) { } }
|
||||
|
||||
break;
|
||||
}
|
||||
case 'changemeshnotify':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue