summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWu Cheng-Han2017-02-07 22:31:38 +0800
committerWu Cheng-Han2017-02-07 22:31:38 +0800
commit1cc27e1794afbe9f23bfb13cd098eeba554b1086 (patch)
tree82975324f6d710d1eef2c6f9b0025f291e99bba8 /lib
parentbbbf64aae465ed46505f4945080fa2d72e8d0b2b (diff)
Fix ldap config not initialize properly
Diffstat (limited to 'lib')
-rw-r--r--lib/config.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/config.js b/lib/config.js
index e765d730..c0373820 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -96,7 +96,7 @@ var google = (process.env.HMD_GOOGLE_CLIENTID && process.env.HMD_GOOGLE_CLIENTSE
clientID: process.env.HMD_GOOGLE_CLIENTID,
clientSecret: process.env.HMD_GOOGLE_CLIENTSECRET
} : (config.google && config.google.clientID && config.google.clientSecret && config.google) || false;
-var ldap = config.ldap || (
+var ldap = config.ldap || ((
process.env.HMD_LDAP_URL ||
process.env.HMD_LDAP_BINDDN ||
process.env.HMD_LDAP_BINDCREDENTIALS ||
@@ -104,10 +104,9 @@ var ldap = config.ldap || (
process.env.HMD_LDAP_SEARCHBASE ||
process.env.HMD_LDAP_SEARCHFILTER ||
process.env.HMD_LDAP_SEARCHATTRIBUTES ||
+ process.env.HMD_LDAP_TLS_CA ||
process.env.HMD_LDAP_PROVIDERNAME
-) || false;
-if (ldap == true)
- ldap = {};
+) ? {} : false);
if (process.env.HMD_LDAP_URL)
ldap.url = process.env.HMD_LDAP_URL;
if (process.env.HMD_LDAP_BINDDN)