[MM-56174] Account for archived channels in channel member for post permission check (#25837)
* [MM-56174] Account for archived channels in channel member for post permission check * Add tests
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1d108f0d9f
Коммит
43cca04f04
@@ -1445,10 +1445,10 @@ func (s *TimerLayerChannelStore) GetMemberCountsByGroup(ctx context.Context, cha
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetMemberForPost(postID string, userID string) (*model.ChannelMember, error) {
|
||||
func (s *TimerLayerChannelStore) GetMemberForPost(postID string, userID string, includeArchivedChannels bool) (*model.ChannelMember, error) {
|
||||
start := time.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetMemberForPost(postID, userID)
|
||||
result, err := s.ChannelStore.GetMemberForPost(postID, userID, includeArchivedChannels)
|
||||
|
||||
elapsed := float64(time.Since(start)) / float64(time.Second)
|
||||
if s.Root.Metrics != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user