diff options
Diffstat (limited to 'app/webhook.go')
-rw-r--r-- | app/webhook.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/webhook.go b/app/webhook.go index a5ab28952..c887fec97 100644 --- a/app/webhook.go +++ b/app/webhook.go @@ -633,6 +633,10 @@ func (a *App) HandleIncomingWebhook(hookId string, req *model.IncomingWebhookReq } } + if hook.ChannelLocked && hook.ChannelId != channel.Id { + return model.NewAppError("HandleIncomingWebhook", "web.incoming_webhook.channel_locked.app_error", nil, "", http.StatusForbidden) + } + if a.License() != nil && *a.Config().TeamSettings.ExperimentalTownSquareIsReadOnly && channel.Name == model.DEFAULT_CHANNEL { return model.NewAppError("HandleIncomingWebhook", "api.post.create_post.town_square_read_only", nil, "", http.StatusForbidden) |