|
|
@@ -23,6 +23,8 @@ module.exports = function(crowi) {
|
|
|
'app:title' : 'Crowi',
|
|
|
'app:confidential' : '',
|
|
|
|
|
|
+ 'app:fileUpload' : false,
|
|
|
+
|
|
|
'security:registrationMode' : 'Open',
|
|
|
'security:registrationWhiteList' : [],
|
|
|
|
|
|
@@ -37,8 +39,6 @@ module.exports = function(crowi) {
|
|
|
'mail:smtpUser' : '',
|
|
|
'mail:smtpPassword' : '',
|
|
|
|
|
|
- 'searcher:url': '',
|
|
|
-
|
|
|
'google:clientId' : '',
|
|
|
'google:clientSecret' : '',
|
|
|
|
|
|
@@ -180,6 +180,17 @@ module.exports = function(crowi) {
|
|
|
return method != 'none';
|
|
|
};
|
|
|
|
|
|
+ configSchema.statics.fileUploadEnabled = function(config)
|
|
|
+ {
|
|
|
+ const Config = this;
|
|
|
+
|
|
|
+ if (!Config.isUploadable(config)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return config.crowi['app:fileUpload'] || false;
|
|
|
+ };
|
|
|
+
|
|
|
configSchema.statics.hasSlackConfig = function(config)
|
|
|
{
|
|
|
if (!config.notification) {
|
|
|
@@ -206,6 +217,24 @@ module.exports = function(crowi) {
|
|
|
return true;
|
|
|
};
|
|
|
|
|
|
+ configSchema.statics.getLocalconfig = function(config)
|
|
|
+ {
|
|
|
+ const Config = this;
|
|
|
+
|
|
|
+ const local_config = {
|
|
|
+ crowi: {
|
|
|
+ title: config.crowi['app:title'],
|
|
|
+ url: config.crowi['app:url'] || '',
|
|
|
+ },
|
|
|
+ upload: {
|
|
|
+ image: Config.isUploadable(config),
|
|
|
+ file: Config.fileUploadEnabled(config),
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+ return local_config;
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
configSchema.statics.isInstalled = function(config)
|
|
|
{
|