Commit e46c1b8d authored by Joram Wilander's avatar Joram Wilander Committed by Corey Hulen
Browse files

Inlcude team Id for fake context for incoming webhooks (#2988)

parent 4f22cbc9
......@@ -434,6 +434,8 @@ func incomingWebhook(c *Context, w http.ResponseWriter, r *http.Request) {
IsOAuth: false,
c.TeamId = hook.TeamId
if !c.HasPermissionsToChannel(pchan, "createIncomingHook") && channel.Type != model.CHANNEL_OPEN {
c.Err = model.NewLocAppError("incomingWebhook", "web.incoming_webhook.permissions.app_error", nil, "")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment