Merge pull request #13 from davidmehren/fix_contacts_disable

Fix parsing the LDAP_CONTACTS environment variable. 
Thank you for the contribution!
This commit is contained in:
sym 2021-06-16 10:32:17 +02:00 committed by GitHub
commit 39ef130adc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,7 @@ module.exports = ContactsController = {
})
},
async getLdapContacts(contacts) {
if (! process.env.LDAP_CONTACTS) {
if (process.env.LDAP_CONTACTS === undefined || !(process.env.LDAP_CONTACTS.toLowerCase() === 'true')) {
return contacts
}
const client = new Client({