[MM-56266] Use ListTeamChannels for member count permission for public channels (#26820)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
6886f389dd
Коммит
a40550136f
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user