MM-10352: Add locking incoming webhooks to a single channel. (#8835)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
1af1bce619
Коммит
8fb070fecf
@@ -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)
|
||||
|
||||
Ссылка в новой задаче
Block a user