diff options
author | Jesús Espino <jespinog@gmail.com> | 2018-09-25 14:42:06 +0200 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2018-09-25 08:42:06 -0400 |
commit | 7636650a25462b0eb3e1ca2f35d8c0d914c40820 (patch) | |
tree | 705d570d340436f39c3ae062558df6cea6fced75 /app/authorization.go | |
parent | 3785ad48c14c2ab9a8c55127b2f2a04cd8b30d6e (diff) | |
download | chat-7636650a25462b0eb3e1ca2f35d8c0d914c40820.tar.gz chat-7636650a25462b0eb3e1ca2f35d8c0d914c40820.tar.bz2 chat-7636650a25462b0eb3e1ca2f35d8c0d914c40820.zip |
Migrate to idiomatic error handling app/a*.go and app/b*.go (#9455)
Diffstat (limited to 'app/authorization.go')
-rw-r--r-- | app/authorization.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/authorization.go b/app/authorization.go index 0955cb90c..9d4714ba1 100644 --- a/app/authorization.go +++ b/app/authorization.go @@ -53,7 +53,9 @@ func (a *App) SessionHasPermissionToChannel(session model.Session, channelId str channel, err := a.GetChannel(channelId) if err == nil && channel.TeamId != "" { return a.SessionHasPermissionToTeam(session, channel.TeamId, permission) - } else if err != nil && err.StatusCode == http.StatusNotFound { + } + + if err != nil && err.StatusCode == http.StatusNotFound { return false } |