|
@@ -40,6 +40,7 @@ function Crowi(rootdir) {
|
|
|
this.globalNotificationService = null;
|
|
this.globalNotificationService = null;
|
|
|
this.crowiSlackNotificationService = null;
|
|
this.crowiSlackNotificationService = null;
|
|
|
this.xssService = null;
|
|
this.xssService = null;
|
|
|
|
|
+ this.aclService = null;
|
|
|
this.restQiitaAPIService = null;
|
|
this.restQiitaAPIService = null;
|
|
|
this.cdnResourcesService = new CdnResourcesService();
|
|
this.cdnResourcesService = new CdnResourcesService();
|
|
|
this.interceptorManager = new InterceptorManager();
|
|
this.interceptorManager = new InterceptorManager();
|
|
@@ -85,6 +86,9 @@ Crowi.prototype.init = async function() {
|
|
|
this.setupSlack(),
|
|
this.setupSlack(),
|
|
|
this.setupCsrf(),
|
|
this.setupCsrf(),
|
|
|
this.setUpGlobalNotification(),
|
|
this.setUpGlobalNotification(),
|
|
|
|
|
+ this.setUpCrowiSlacklNotification(),
|
|
|
|
|
+ this.setUpXss(),
|
|
|
|
|
+ this.setUpAcl(),
|
|
|
this.setUpRestQiitaAPI(),
|
|
this.setUpRestQiitaAPI(),
|
|
|
]);
|
|
]);
|
|
|
};
|
|
};
|
|
@@ -453,13 +457,23 @@ Crowi.prototype.setUpCrowiSlacklNotification = function() {
|
|
|
/**
|
|
/**
|
|
|
* setup XssService
|
|
* setup XssService
|
|
|
*/
|
|
*/
|
|
|
-Crowi.prototype.setUpCrowiSlacklNotification = function() {
|
|
|
|
|
|
|
+Crowi.prototype.setUpXss = function() {
|
|
|
const XssService = require('../service/xss');
|
|
const XssService = require('../service/xss');
|
|
|
if (this.xssService == null) {
|
|
if (this.xssService == null) {
|
|
|
this.xssService = new XssService(this);
|
|
this.xssService = new XssService(this);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * setup AclService
|
|
|
|
|
+ */
|
|
|
|
|
+Crowi.prototype.setUpAcl = function() {
|
|
|
|
|
+ const AclService = require('../service/acl');
|
|
|
|
|
+ if (this.aclService == null) {
|
|
|
|
|
+ this.aclService = new AclService(this);
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* setup RestQiitaAPIService
|
|
* setup RestQiitaAPIService
|
|
|
*/
|
|
*/
|