From fadd9514f6e71590aba781a7035e1de4150137b0 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 4 Oct 2017 11:42:38 -0400 Subject: PLT-7718 Patch for files (#7564) * Patch for files * Fix merge * Fix tests * Fix another test --- app/authorization.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/authorization.go') diff --git a/app/authorization.go b/app/authorization.go index ae5c7c3b3..01180e8d8 100644 --- a/app/authorization.go +++ b/app/authorization.go @@ -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) -- cgit v1.2.3-1-g7c22