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

Fixed agent invite codes to make them unique per domain.

This commit is contained in:
Ylian Saint-Hilaire 2020-04-30 18:52:45 -07:00
parent d86d7e4a82
commit 11576ca5f3
3 changed files with 3 additions and 3 deletions

View file

@ -2457,7 +2457,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
var dup = null;
for (var i in command.invite.codes) {
for (var j in parent.meshes) {
if ((j != command.meshid) && (parent.meshes[j].invite != null) && (parent.meshes[j].invite.codes.indexOf(command.invite.codes[i]) >= 0)) { dup = command.invite.codes[i]; break; }
if ((j != command.meshid) && (parent.meshes[j].domain == domain.id) && (parent.meshes[j].invite != null) && (parent.meshes[j].invite.codes.indexOf(command.invite.codes[i]) >= 0)) { dup = command.invite.codes[i]; break; }
}
}
if (dup != null) {