Manual Cherrypick: Add audits for accessing posts without membership (#31266) (#35022)

Automatic Merge
Этот коммит содержится в:
Daniel Espino García
2026-01-26 11:23:28 +01:00
коммит произвёл GitHub
родитель 12dce033d6
Коммит 21a86506f9
79 изменённых файлов: 1707 добавлений и 1001 удалений

Просмотреть файл

@@ -70,7 +70,12 @@ func (a *App) CreateCommandPost(c request.CTX, post *model.Post, teamID string,
}
if response.ResponseType == model.CommandResponseTypeInChannel {
return a.CreatePostMissingChannel(c, post, true, true)
// The post is only used for tests, so even if there are membership issues, we won't send the post to the client.
createdPost, _, appErr := a.CreatePostMissingChannel(c, post, true, true)
if appErr != nil {
return nil, appErr
}
return createdPost, nil
}
if (response.ResponseType == "" || response.ResponseType == model.CommandResponseTypeEphemeral) && (response.Text != "" || response.Attachments != nil) {