MM-11728: Avoid Archived channels editions throught Patch (#9335)

Этот коммит содержится в:
Jesús Espino
2018-09-03 17:07:51 +02:00
коммит произвёл Carlos Tadeu Panato Junior
родитель 9f46512759
Коммит 72560311a2
3 изменённых файлов: 15 добавлений и 0 удалений

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

@@ -463,6 +463,11 @@ func (s SqlChannelStore) Update(channel *model.Channel) store.StoreChannel {
return store.Do(func(result *store.StoreResult) {
channel.PreUpdate()
if channel.DeleteAt != 0 {
result.Err = model.NewAppError("SqlChannelStore.Update", "store.sql_channel.update.archived_channel.app_error", nil, "", http.StatusBadRequest)
return
}
if result.Err = channel.IsValid(); result.Err != nil {
return
}