external ldap: run syncer every 4 hours

hardcoded for now but we should make this configurable
This commit is contained in:
Girish Ramakrishnan
2024-01-13 15:53:14 +01:00
parent 4136272382
commit 257dc4e271
3 changed files with 24 additions and 2 deletions

View File

@@ -18,6 +18,7 @@ const assert = require('assert'),
AuditSource = require('./auditsource.js'),
BoxError = require('./boxerror.js'),
constants = require('./constants.js'),
cron = require('./cron.js'),
debug = require('debug')('box:externalldap'),
eventlog = require('./eventlog.js'),
groups = require('./groups.js'),
@@ -87,6 +88,8 @@ async function setConfig(newConfig, auditSource) {
if (newConfig.provider === 'noop') await users.resetSource(); // otherwise, the owner could be 'ldap' source and lock themselves out
await eventlog.add(eventlog.ACTION_EXTERNAL_LDAP_CONFIGURE, auditSource, { oldConfig: removePrivateFields(currentConfig), config: removePrivateFields(newConfig) });
await cron.handleExternalLdapChanged();
}
// performs service bind if required