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
ee3936af32
commit
f4afd7a8ea
@ -908,7 +908,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||||||
// Check that the user has access to this nodeid
|
// Check that the user has access to this nodeid
|
||||||
if (obj.user.links == null) return;
|
if (obj.user.links == null) return;
|
||||||
db.Get(command.nodeid, function (err, nodes) {
|
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];
|
const node = nodes[0];
|
||||||
|
|
||||||
var meshlink = obj.user.links[node.meshid];
|
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 each nodeid, change the group
|
||||||
for (var i = 0; i < command.nodeids.length; i++) {
|
for (var i = 0; i < command.nodeids.length; i++) {
|
||||||
db.Get(command.nodeids[i], function (err, nodes) {
|
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];
|
const node = nodes[0];
|
||||||
|
|
||||||
// Check if already in the right mesh
|
// Check if already in the right mesh
|
||||||
|
Loading…
Reference in New Issue
Block a user