mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 23:25:53 -05:00
Fixed checking code.
This commit is contained in:
parent
7f5b8ae21e
commit
83612d06a3
@ -908,7 +908,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
// Check that the user has access to this nodeid
|
||||
if (obj.user.links == null) return;
|
||||
db.Get(command.nodeid, function (err, nodes) {
|
||||
if ((node == null) || (nodes.length != 1)) return;
|
||||
if ((nodes == null) || (nodes.length != 1)) return;
|
||||
const node = nodes[0];
|
||||
|
||||
var meshlink = obj.user.links[node.meshid];
|
||||
@ -1987,7 +1987,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
// For each nodeid, change the group
|
||||
for (var i = 0; i < command.nodeids.length; i++) {
|
||||
db.Get(command.nodeids[i], function (err, nodes) {
|
||||
if ((node == null) || (nodes.length != 1)) return;
|
||||
if ((nodes == null) || (nodes.length != 1)) return;
|
||||
const node = nodes[0];
|
||||
|
||||
// Check if already in the right mesh
|
||||
|
Loading…
Reference in New Issue
Block a user