Improve system admin permissions to dms and gms (#29656)

* revert the api4 portion of 57372bd06b

* test: Add system admin channel access tests

* skip a.HasPermissionToTeam for channels without a team

* fix TestPostGetInfo
Этот коммит содержится в:
Jesse Hallam
2024-12-20 12:49:58 -04:00
коммит произвёл GitHub
родитель 812034f5eb
Коммит 9e01424b15
4 изменённых файлов: 203 добавлений и 9 удалений

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

@@ -278,7 +278,7 @@ func (a *App) HasPermissionToChannel(c request.CTX, askingUserId string, channel
}
channel, appErr := a.GetChannel(c, channelID)
if appErr == nil {
if appErr == nil && channel.TeamId != "" {
return a.HasPermissionToTeam(c, askingUserId, channel.TeamId, permission)
}