Explorar el Código

Ensure to initialize PassportService even if installed cleanly

Yuki Takei hace 8 años
padre
commit
80c37891eb
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      lib/models/config.js

+ 5 - 0
lib/models/config.js

@@ -248,6 +248,11 @@ module.exports = function(crowi) {
 
   configSchema.statics.isEnabledPassport = function(config)
   {
+    // always true if crowi-plus installed cleanly
+    if (Object.keys(config.crowi).length == 0) {
+      return true;
+    }
+
     const key = 'security:isEnabledPassport';
     return getValueForCrowiNS(config, key);
   };