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:
parent
9873c2f3cf
commit
21d6d43593
4 changed files with 55 additions and 8 deletions
|
@ -3539,6 +3539,13 @@
|
|||
// Check direct device rights using device data
|
||||
if ((node.links != null) && (node.links[userid] != null)) { r |= node.links[userid].rights; } // TODO: Deal with reverse permissions
|
||||
|
||||
// Check direct device rights thru user groups
|
||||
if ((node.links != null) && (userinfo.links != null)) {
|
||||
for (var i in node.links) {
|
||||
if (i.startsWith('ugrp/') && (userinfo.links[i] != null) && (node.links[i].rights != null)) { r |= node.links[i].rights; }
|
||||
}
|
||||
}
|
||||
|
||||
// Check direct device rights using user data
|
||||
/*
|
||||
if (userid == userinfo._id) { user = userinfo; } else { if (users != null) { user = users[userid]; } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue