Skip notifications for ldap syncer events
This commit is contained in:
@@ -24,6 +24,7 @@ exports = module.exports = {
|
||||
|
||||
let assert = require('assert'),
|
||||
async = require('async'),
|
||||
auditsource = require('./auditsource.js'),
|
||||
changelog = require('./changelog.js'),
|
||||
custom = require('./custom.js'),
|
||||
DatabaseError = require('./databaseerror.js'),
|
||||
@@ -345,6 +346,9 @@ function onEvent(id, action, source, data, callback) {
|
||||
assert.strictEqual(typeof data, 'object');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
// external ldap syncer does not generate notifications - FIXME username might be an issue here
|
||||
if (source.username === auditsource.EXTERNAL_LDAP_TASK.username) return callback();
|
||||
|
||||
switch (action) {
|
||||
case eventlog.ACTION_USER_ADD:
|
||||
return userAdded(source.userId, id, data.user, callback);
|
||||
|
||||
Reference in New Issue
Block a user