Fix logging for ldap module

This commit is contained in:
vladimir 2017-03-15 20:44:12 +02:00
parent 1ca27b6b40
commit b6497b0e86

View file

@ -16,8 +16,9 @@ let LdapStrategy;
try {
LdapStrategy = require('passport-ldapjs').Strategy; // eslint-disable-line global-require
} catch (E) {
// ignore
console.warn('Module "passport-ldapjs" not installed. LDAP auth will fail.');
if (config.ldap.enabled) {
log.info('LDAP', 'Module "passport-ldapjs" not installed. LDAP auth will fail.');
}
}
module.exports.csrfProtection = csrf({