summaryrefslogtreecommitdiffstats
path: root/app/authorization.go
diff options
context:
space:
mode:
authorJesús Espino <jespinog@gmail.com>2018-09-25 14:42:06 +0200
committerJoram Wilander <jwawilander@gmail.com>2018-09-25 08:42:06 -0400
commit7636650a25462b0eb3e1ca2f35d8c0d914c40820 (patch)
tree705d570d340436f39c3ae062558df6cea6fced75 /app/authorization.go
parent3785ad48c14c2ab9a8c55127b2f2a04cd8b30d6e (diff)
downloadchat-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.go4
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
}