mirror of https://github.com/grafana/grafana.git
				
				
				
			pkg/middleware/middleware.go: Fix empty branch warning.
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=megacheck ./...
pkg/middleware/middleware.go:46:3⚠️ empty branch (SA9003) (megacheck)
			
			
This commit is contained in:
		
							parent
							
								
									abb6b135a3
								
							
						
					
					
						commit
						e673337cb9
					
				|  | @ -43,12 +43,13 @@ func GetContextHandler() macaron.Handler { | |||
| 		// then init session and look for userId in session
 | ||||
| 		// then look for api key in session (special case for render calls via api)
 | ||||
| 		// then test if anonymous access is enabled
 | ||||
| 		if initContextWithRenderAuth(ctx) || | ||||
| 			initContextWithApiKey(ctx) || | ||||
| 			initContextWithBasicAuth(ctx, orgId) || | ||||
| 			initContextWithAuthProxy(ctx, orgId) || | ||||
| 			initContextWithUserSessionCookie(ctx, orgId) || | ||||
| 			initContextWithAnonymousUser(ctx) { | ||||
| 		switch { | ||||
| 		case initContextWithRenderAuth(ctx): | ||||
| 		case initContextWithApiKey(ctx): | ||||
| 		case initContextWithBasicAuth(ctx, orgId): | ||||
| 		case initContextWithAuthProxy(ctx, orgId): | ||||
| 		case initContextWithUserSessionCookie(ctx, orgId): | ||||
| 		case initContextWithAnonymousUser(ctx): | ||||
| 		} | ||||
| 
 | ||||
| 		ctx.Logger = log.New("context", "userId", ctx.UserId, "orgId", ctx.OrgId, "uname", ctx.Login) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue