external ldap: run syncer every 4 hours
hardcoded for now but we should make this configurable
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user