|
|
@@ -172,7 +172,7 @@ module.exports = (crowi) => {
|
|
|
isEnabledLinebreaksInComments: await crowi.configManager.getConfig('markdown', 'markdown:isEnabledLinebreaksInComments'),
|
|
|
};
|
|
|
|
|
|
- const parameters = { action: SupportedAction.ACTION_ADMIN_LINE_BREAK_UPDATE };
|
|
|
+ const parameters = { action: SupportedAction.ACTION_ADMIN_MARKDOWN_LINE_BREAK_UPDATE };
|
|
|
activityEvent.emit('update', res.locals.activity._id, parameters);
|
|
|
|
|
|
return res.apiv3({ lineBreaksParams });
|
|
|
@@ -185,7 +185,7 @@ module.exports = (crowi) => {
|
|
|
|
|
|
});
|
|
|
|
|
|
- router.put('/indent', loginRequiredStrictly, adminRequired, csrf, validator.indent, apiV3FormValidator, async(req, res) => {
|
|
|
+ router.put('/indent', loginRequiredStrictly, adminRequired, csrf, addActivity, validator.indent, apiV3FormValidator, async(req, res) => {
|
|
|
|
|
|
const requestIndentParams = {
|
|
|
'markdown:adminPreferredIndentSize': req.body.adminPreferredIndentSize,
|
|
|
@@ -198,6 +198,10 @@ module.exports = (crowi) => {
|
|
|
adminPreferredIndentSize: await crowi.configManager.getConfig('markdown', 'markdown:adminPreferredIndentSize'),
|
|
|
isIndentSizeForced: await crowi.configManager.getConfig('markdown', 'markdown:isIndentSizeForced'),
|
|
|
};
|
|
|
+
|
|
|
+ const parameters = { action: SupportedAction.ACTION_ADMIN_MARKDOWN_INDENT_UPDATE };
|
|
|
+ activityEvent.emit('update', res.locals.activity._id, parameters);
|
|
|
+
|
|
|
return res.apiv3({ indentParams });
|
|
|
}
|
|
|
catch (err) {
|
|
|
@@ -231,7 +235,7 @@ module.exports = (crowi) => {
|
|
|
* schema:
|
|
|
* $ref: '#/components/schemas/PresentationParams'
|
|
|
*/
|
|
|
- router.put('/presentation', loginRequiredStrictly, adminRequired, csrf, validator.presentationSetting, apiV3FormValidator, async(req, res) => {
|
|
|
+ router.put('/presentation', loginRequiredStrictly, adminRequired, csrf, addActivity, validator.presentationSetting, apiV3FormValidator, async(req, res) => {
|
|
|
if (req.body.pageBreakSeparator === 3 && req.body.pageBreakCustomSeparator === '') {
|
|
|
return res.apiv3Err(new ErrorV3('customRegularExpression is required'));
|
|
|
}
|
|
|
@@ -247,6 +251,10 @@ module.exports = (crowi) => {
|
|
|
pageBreakSeparator: await crowi.configManager.getConfig('markdown', 'markdown:presentation:pageBreakSeparator'),
|
|
|
pageBreakCustomSeparator: await crowi.configManager.getConfig('markdown', 'markdown:presentation:pageBreakCustomSeparator') || '',
|
|
|
};
|
|
|
+
|
|
|
+ const parameters = { action: SupportedAction.ACTION_ADMIN_MARKDOWN_PRESENTATION_UPDATE };
|
|
|
+ activityEvent.emit('update', res.locals.activity._id, parameters);
|
|
|
+
|
|
|
return res.apiv3({ presentationParams });
|
|
|
}
|
|
|
catch (err) {
|
|
|
@@ -280,7 +288,7 @@ module.exports = (crowi) => {
|
|
|
* schema:
|
|
|
* $ref: '#/components/schemas/XssParams'
|
|
|
*/
|
|
|
- router.put('/xss', loginRequiredStrictly, adminRequired, csrf, validator.xssSetting, apiV3FormValidator, async(req, res) => {
|
|
|
+ router.put('/xss', loginRequiredStrictly, adminRequired, csrf, addActivity, validator.xssSetting, apiV3FormValidator, async(req, res) => {
|
|
|
if (req.body.isEnabledXss && req.body.xssOption == null) {
|
|
|
return res.apiv3Err(new ErrorV3('xss option is required'));
|
|
|
}
|
|
|
@@ -300,6 +308,10 @@ module.exports = (crowi) => {
|
|
|
tagWhiteList: await crowi.configManager.getConfig('markdown', 'markdown:xss:tagWhiteList'),
|
|
|
attrWhiteList: await crowi.configManager.getConfig('markdown', 'markdown:xss:attrWhiteList'),
|
|
|
};
|
|
|
+
|
|
|
+ const parameters = { action: SupportedAction.ACTION_ADMIN_MARKDOWN_XSS_UPDATE };
|
|
|
+ activityEvent.emit('update', res.locals.activity._id, parameters);
|
|
|
+
|
|
|
return res.apiv3({ xssParams });
|
|
|
}
|
|
|
catch (err) {
|