1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Can now directly change user permissions in a device group.

This commit is contained in:
Ylian Saint-Hilaire 2019-07-23 13:37:12 -07:00
parent 32cc09e813
commit 1e1df4b874
6 changed files with 208 additions and 94 deletions

View file

@ -1687,7 +1687,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
if (newuser != null) {
// Add mesh to user
if (newuser.links == null) newuser.links = {};
newuser.links[command.meshid] = { rights: command.meshadmin };
if (newuser.links[command.meshid]) { newuser.links[command.meshid].rights = command.meshadmin; } else { newuser.links[command.meshid] = { rights: command.meshadmin }; }
db.SetUser(newuser);
parent.parent.DispatchEvent([newuser._id], obj, 'resubscribe');