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

Fixes for SSO accounts and server peering.

This commit is contained in:
Ylian Saint-Hilaire 2020-11-28 18:03:09 -08:00
parent b3f0a0b77c
commit 67b748d1e6
2 changed files with 23 additions and 10 deletions

3
db.js
View file

@ -1615,6 +1615,7 @@ module.exports.CreateDB = function (parent, func) {
// Called when a user account has changed
function dbUserChange(userChange, added) {
if (parent.webserver == null) return;
common.unEscapeLinksFieldName(userChange.fullDocument);
const user = performTypedRecordDecrypt([userChange.fullDocument])[0];
// Update the user object in memory
@ -1635,7 +1636,7 @@ module.exports.CreateDB = function (parent, func) {
const usergroup = ugrpChange.fullDocument;
// Update the user group object in memory
const uusergroup = parent.webserver.usergroups[usergroup._id];
const uusergroup = parent.webserver.userGroups[usergroup._id];
for (var i in usergroup) { uusergroup[i] = usergroup[i]; }
for (var i in uusergroup) { if (usergroup[i] == null) { delete uusergroup[i]; } }