فهرست منبع

Merge pull request #4298 from weseek/fix/add-middleware

add middleware
Sizma yosimaz 4 سال پیش
والد
کامیت
615657e88e
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      packages/app/src/server/routes/apiv3/slack-integration-settings.js

+ 1 - 1
packages/app/src/server/routes/apiv3/slack-integration-settings.js

@@ -396,7 +396,7 @@ module.exports = (crowi) => {
    *             description: Succeeded to put CustomBotWithoutProxy permissions.
    *             description: Succeeded to put CustomBotWithoutProxy permissions.
    */
    */
 
 
-  router.put('/without-proxy/update-permissions', async(req, res) => {
+  router.put('/without-proxy/update-permissions', loginRequiredStrictly, adminRequired, csrf, async(req, res) => {
     const currentBotType = crowi.configManager.getConfig('crowi', 'slackbot:currentBotType');
     const currentBotType = crowi.configManager.getConfig('crowi', 'slackbot:currentBotType');
     if (currentBotType !== SlackbotType.CUSTOM_WITHOUT_PROXY) {
     if (currentBotType !== SlackbotType.CUSTOM_WITHOUT_PROXY) {
       const msg = 'Not CustomBotWithoutProxy';
       const msg = 'Not CustomBotWithoutProxy';