externalldap: reset group source when disabled

This commit is contained in:
Girish Ramakrishnan
2024-01-13 22:35:23 +01:00
parent 1faf83afe4
commit ee43dff35f
2 changed files with 11 additions and 1 deletions
+4 -1
View File
@@ -85,7 +85,10 @@ async function setConfig(newConfig, auditSource) {
await settings.setJson(settings.EXTERNAL_LDAP_KEY, newConfig);
if (newConfig.provider === 'noop') await users.resetSource(); // otherwise, the owner could be 'ldap' source and lock themselves out
if (newConfig.provider === 'noop') {
await users.resetSource(); // otherwise, the owner could be 'ldap' source and lock themselves out
await groups.resetSource();
}
await eventlog.add(eventlog.ACTION_EXTERNAL_LDAP_CONFIGURE, auditSource, { oldConfig: removePrivateFields(currentConfig), config: removePrivateFields(newConfig) });