|
|
@@ -19,9 +19,9 @@ module.exports = function(crowi) {
|
|
|
function getArrayForInstalling()
|
|
|
{
|
|
|
return {
|
|
|
+ //'app:installed' : "0.0.0",
|
|
|
'app:title' : 'Crowi',
|
|
|
'app:confidential' : '',
|
|
|
- 'app:uploadable' : false,
|
|
|
|
|
|
'security:registrationMode' : 'Open',
|
|
|
'security:registrationWhiteList' : [],
|
|
|
@@ -159,9 +159,6 @@ module.exports = function(crowi) {
|
|
|
config[el.ns][el.key] = JSON.parse(el.value);
|
|
|
});
|
|
|
|
|
|
- // temporary ...
|
|
|
- config.crowi['app:uploadable'] = Config.isUploadable(config);
|
|
|
-
|
|
|
debug('Config loaded', config);
|
|
|
return callback(null, config);
|
|
|
});
|
|
|
@@ -179,6 +176,22 @@ module.exports = function(crowi) {
|
|
|
return true;
|
|
|
};
|
|
|
|
|
|
+ /*
|
|
|
+ configSchema.statics.isInstalled = function(config)
|
|
|
+ {
|
|
|
+ if (!config.crowi) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (config.crowi['app:installed']
|
|
|
+ && config.crowi['app:installed'] !== '0.0.0') {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ */
|
|
|
+
|
|
|
Config = mongoose.model('Config', configSchema);
|
|
|
Config.SECURITY_REGISTRATION_MODE_OPEN = SECURITY_REGISTRATION_MODE_OPEN;
|
|
|
Config.SECURITY_REGISTRATION_MODE_RESTRICTED = SECURITY_REGISTRATION_MODE_RESTRICTED;
|