PLT-7718 Patch for files (#7564)
* Patch for files * Fix merge * Fix tests * Fix another test
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
fa80cb10a8
Коммит
fadd9514f6
@@ -4,6 +4,7 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
@@ -50,6 +51,8 @@ func (a *App) SessionHasPermissionToChannel(session model.Session, channelId str
|
||||
channel, err := a.GetChannel(channelId)
|
||||
if err == nil && channel.TeamId != "" {
|
||||
return SessionHasPermissionToTeam(session, channel.TeamId, permission)
|
||||
} else if err != nil && err.StatusCode == http.StatusNotFound {
|
||||
return false
|
||||
}
|
||||
|
||||
return SessionHasPermissionTo(session, permission)
|
||||
|
||||
Ссылка в новой задаче
Block a user