[MM-16330] Migrate "Channel.GetForPost" to Sync by default (#11199)
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
209f70e80b
Коммит
5c32f92413
@@ -75,8 +75,7 @@ func (a *App) SessionHasPermissionToChannelByPost(session model.Session, postId
|
||||
}
|
||||
}
|
||||
|
||||
if result := <-a.Srv.Store.Channel().GetForPost(postId); result.Err == nil {
|
||||
channel := result.Data.(*model.Channel)
|
||||
if channel, err := a.Srv.Store.Channel().GetForPost(postId); err == nil {
|
||||
if channel.TeamId != "" {
|
||||
return a.SessionHasPermissionToTeam(session, channel.TeamId, permission)
|
||||
}
|
||||
@@ -175,8 +174,7 @@ func (a *App) HasPermissionToChannelByPost(askingUserId string, postId string, p
|
||||
}
|
||||
}
|
||||
|
||||
if result := <-a.Srv.Store.Channel().GetForPost(postId); result.Err == nil {
|
||||
channel := result.Data.(*model.Channel)
|
||||
if channel, err := a.Srv.Store.Channel().GetForPost(postId); err == nil {
|
||||
return a.HasPermissionToTeam(askingUserId, channel.TeamId, permission)
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user