From 7636650a25462b0eb3e1ca2f35d8c0d914c40820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Tue, 25 Sep 2018 14:42:06 +0200 Subject: Migrate to idiomatic error handling app/a*.go and app/b*.go (#9455) --- app/authorization.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/authorization.go') 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 } -- cgit v1.2.3-1-g7c22