# Code review request for \`slackdoor\` plugin

**URL:** <https://meta.discourse.org/t/code-review-request-for-slackdoor-plugin/44253>\
**Category:** Development\
**Created:** [May 14, 2016, 8:28pm UTC](https://meta.discourse.org/t/code-review-request-for-slackdoor-plugin/44253 "2016-05-14T20:28:04Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)\
**Post date:** [May 17, 2016, 5:24am UTC](https://meta.discourse.org/t/code-review-request-for-slackdoor-plugin/44253/4 "2016-05-17T05:24:48Z")

</div>

Accepting incoming webhooks, that’s something I am interested. But it’ll be general. Pre-defined actions, some policy to process the webhooks. I probably will use that for testing webhooks among several Discourse instances.

> [@mcwumbly](#):
>
> The request can’t include an API Key or username, but a required SiteSetting for username determines which user is used to access the topic.

> <https://github.com/mcwumbly/discourse-slackdoor/blob/master/plugin.rb#L86-L95>

It’s better to use `skip_before_{filter,action}`, both simple and clear. The risk comes from you don’t know how to authenticate an incoming request. If one Discourse instance is private, this endpoint would open a door for the world by guessing possible url patterns.

> <https://github.com/mcwumbly/discourse-slackdoor/blob/master/plugin.rb#L38-L49>

If checking SiteSetting is needed, batching all of them in one function could be enough

---

_[View the full topic](https://meta.discourse.org/t/code-review-request-for-slackdoor-plugin/44253)._
