summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYukai Huang2017-01-15 03:45:19 +0000
committerYukai Huang2017-01-15 03:45:19 +0000
commit75e28a1d5e0476d73b59b2255aec2b7e6d0a6cdc (patch)
tree12838f33d941e8734c87383c4653b8b63bbd95a6 /lib
parentb3ed4445651b373b14217a55e6382f9025ab345a (diff)
parentc0e8306961a47e7a2ba52d0445c12aaa5fe07949 (diff)
Merge branch 't216-refactor-common' into 'frontend-next'
T216 refactor common See merge request !5
Diffstat (limited to 'lib')
-rw-r--r--lib/config.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/config.js b/lib/config.js
index f6e7f2c4..84f6b3d7 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -90,11 +90,11 @@ var gitlab = (process.env.HMD_GITLAB_CLIENTID && process.env.HMD_GITLAB_CLIENTSE
var dropbox = (process.env.HMD_DROPBOX_CLIENTID && process.env.HMD_DROPBOX_CLIENTSECRET) ? {
clientID: process.env.HMD_DROPBOX_CLIENTID,
clientSecret: process.env.HMD_DROPBOX_CLIENTSECRET
-} : config.dropbox || false;
+} : (config.dropbox && config.dropbox.clientID && config.dropbox.clientSecret) || false;
var google = (process.env.HMD_GOOGLE_CLIENTID && process.env.HMD_GOOGLE_CLIENTSECRET) ? {
clientID: process.env.HMD_GOOGLE_CLIENTID,
clientSecret: process.env.HMD_GOOGLE_CLIENTSECRET
-} : config.google || false;
+} : (config.google && config.google.clientID && config.google.clientSecret) || false;
var ldap = config.ldap || (
process.env.HMD_LDAP_URL ||
process.env.HMD_LDAP_BINDDN ||