migrate groups.enabled in oidc #6104

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2024-05-21 19:04:43 +01:00
parent f1ba76a423
commit bc6451fee5
1 changed files with 8 additions and 0 deletions

View File

@ -7472,6 +7472,14 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
}
delete strategy.scope
}
if (strategy.groups && strategy.groups.sync && strategy.groups.sync.enabled && strategy.groups.sync.enabled === true) {
if (strategy.groups.sync.filter) {
delete strategy.groups.sync.enabled;
} else {
strategy.groups.sync = true;
}
parent.authLog('migrateOldConfigs', `OIDC: OLD CONFIG: Moving old config to new location. strategy.groups.sync.enabled => strategy.groups.sync`);
}
return strategy
}