[MM-56266] Use ListTeamChannels for member count permission for public channels (#26820)

Этот коммит содержится в:
Devin Binnie
2024-04-23 09:24:59 -04:00
коммит произвёл GitHub
родитель 6886f389dd
Коммит a40550136f
4 изменённых файлов: 35 добавлений и 2 удалений

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

@@ -732,8 +732,8 @@ func getChannelsMemberCount(c *Context, w http.ResponseWriter, r *http.Request)
}
for _, channel := range channels {
if !c.App.HasPermissionToReadChannel(c.AppContext, c.AppContext.Session().UserId, channel) {
c.SetPermissionError(model.PermissionReadChannel)
if !c.App.HasPermissionToChannelMemberCount(c.AppContext, c.AppContext.Session().UserId, channel) {
c.SetPermissionError(model.PermissionListTeamChannels)
return
}
}