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

More work on individual device thru user groups.

This commit is contained in:
Ylian Saint-Hilaire 2020-04-13 10:50:57 -07:00
parent 9873c2f3cf
commit 21d6d43593
4 changed files with 55 additions and 8 deletions

View file

@ -487,8 +487,18 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
// Request a list of all meshes this user as rights to
links = parent.GetAllMeshIdWithRights(user);
// Add any nodes with direct rights
if (obj.user.links != null) { for (var i in obj.user.links) { if (i.startsWith('node/')) { if (extraids == null) { extraids = []; } extraids.push(i); } } }
// Add any nodes with direct rights or any nodes with user group direct rights
if (obj.user.links != null) {
for (var i in obj.user.links) {
if (i.startsWith('node/')) { if (extraids == null) { extraids = []; } extraids.push(i); }
else if (i.startsWith('ugrp/')) {
const g = parent.userGroups[i];
if ((g != null) && (g.links != null)) {
for (var j in g.links) { if (j.startsWith('node/')) { if (extraids == null) { extraids = []; } extraids.push(j); } }
}
}
}
}
} else {
// Request list of all nodes for one specific meshid
meshid = command.meshid;