mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Improved uicustomevent security and events, #3823
This commit is contained in:
parent
3e0b76d423
commit
5a81c84d67
3 changed files with 43 additions and 9 deletions
12
webserver.js
12
webserver.js
|
@ -7158,6 +7158,18 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
|||
return rights;
|
||||
}
|
||||
|
||||
|
||||
// Return the node and rights for a array of nodeids
|
||||
obj.GetNodesWithRights = function (domain, user, nodeids, func) {
|
||||
var rc = nodeids.length, r = {};
|
||||
for (var i in nodeids) {
|
||||
obj.GetNodeWithRights(domain, user, nodeids[i], function (node, rights, visible) {
|
||||
if ((node != null) && (visible == true)) { r[node._id] = { node: node, rights: rights }; if (--rc == 0) { func(r); } }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Return the node and rights for a given nodeid
|
||||
obj.GetNodeWithRights = function (domain, user, nodeid, func) {
|
||||
// Perform user pre-validation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue