[MM-25659] ability to permanent delete channel through client (#15202)
Summary
Ability to permanent delete channel through client
Ticket Link
https://mattermost.atlassian.net/browse/MM-25659
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
11513a8d0d
Коммит
d76039db23
@@ -1074,7 +1074,15 @@ func deleteChannel(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
err = c.App.DeleteChannel(channel, c.App.Session().UserId)
|
||||
if c.Params.Permanent {
|
||||
if *c.App.Config().ServiceSettings.EnableAPIChannelDeletion {
|
||||
err = c.App.PermanentDeleteChannel(channel)
|
||||
} else {
|
||||
err = model.NewAppError("deleteChannel", "api.user.delete_channel.not_enabled.app_error", nil, "channelId="+c.Params.ChannelId, http.StatusUnauthorized)
|
||||
}
|
||||
} else {
|
||||
err = c.App.DeleteChannel(channel, c.App.Session().UserId)
|
||||
}
|
||||
if err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user