mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 22:55:52 -05:00
Merge pull request #4521 from mstrhakr/bug-4520
BUG: Fix handleStrategyLogin checking undefined property.
This commit is contained in:
commit
1abaa54b62
@ -2673,8 +2673,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
||||
if ((req.user.name != null) && (req.user.name != user.name)) { user.name = req.user.name; userChanged = true; }
|
||||
if ((req.user.email != null) && (req.user.email != user.email)) { user.email = req.user.email; user.emailVerified = true; userChanged = true; }
|
||||
|
||||
if (typeof domain.authstrategies[authStrategy].groups == 'object') {
|
||||
// Sync the user groups if enabled
|
||||
if (domain.authstrategies[authStrategy].groups.sync.enabled === true) { syncExternalUserGroups(domain, user, userMemberships, authStrategy) }
|
||||
if ((typeof domain.authstrategies[authStrategy].groups.sync == 'object') && (domain.authstrategies[authStrategy].groups.sync.enabled === true)) { syncExternalUserGroups(domain, user, userMemberships, authStrategy) }
|
||||
|
||||
// See if the user is a member of the site admin group.
|
||||
if ((typeof domain.authstrategies[authStrategy].groups.siteadmin !== 'undefined') && (domain.authstrategies[authStrategy].groups.siteadmin !== null)) {
|
||||
@ -2688,6 +2689,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
||||
userChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update db record for user if there are changes detected
|
||||
if (userChanged) {
|
||||
|
Loading…
Reference in New Issue
Block a user