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

Started work on adding user groups in individual device permissions.

This commit is contained in:
Ylian Saint-Hilaire 2020-04-12 22:51:57 -07:00
parent d4d29f88ba
commit 762347ed5e
4 changed files with 1265 additions and 1126 deletions

View file

@ -274,7 +274,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
// Check device links, if a link points to an unknown user, remove it.
if (device.links != null) {
for (var j in device.links) {
if (obj.users[j] == null) {
if ((obj.users[j] == null) && (obj.userGroups[j] == null)) {
delete device.links[j];
if (Object.keys(device.links).length == 0) { delete device.links; }
}