zahmis 4 лет назад
Родитель
Сommit
1f8e73a368
1 измененных файлов с 0 добавлено и 24 удалено
  1. 0 24
      packages/slackbot-proxy/src/controllers/slack.ts

+ 0 - 24
packages/slackbot-proxy/src/controllers/slack.ts

@@ -267,30 +267,6 @@ export class SlackCtrl {
       return;
     }
 
-    // check permission at channel level
-    // const relationMock = await this.relationMockRepository.findOne({ where: { installation } });
-    // const channelsObject = relationMock?.permittedChannelsForEachCommand.channelsObject;
-
-
-    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
-    // const permittedCommandsForChannel = Object.keys(channelsObject!); // eg. [ 'create', 'search', 'togetter', ... ]
-    // const targetCommand = permittedCommandsForChannel.find(e => e === extractCommandName);
-    // // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
-    // const permittedChannels = channelsObject![targetCommand!];
-    // const permittedChannels = await this.getPermittedChannels(req, extractCommandName);
-
-    // const commandRegExp = new RegExp(`(^${extractCommandName}$)|(^${extractCommandName}:\\w+)`);
-
-    // if (commandRegExp.test(actionId) || commandRegExp.test(callBackId)) {
-    //   console.log(fromChannel);
-
-    //   const isPermittedChannel = permittedChannels.includes(fromChannel);
-
-    //   if (!isPermittedChannel) {
-    //     await this.sendNotPermissionMessage(body, relations, extractCommandName);
-    //   }
-    // }
-
 
     // forward to GROWI server
     if (callBackId === 'select_growi') {