File tree 2 files changed +8
-11
lines changed
2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -98,14 +98,14 @@ func (l Listener) authorizeHandler(protected http.Handler) http.Handler {
98
98
}
99
99
scopedRecord .User = user
100
100
authorized , reason , err := l .Authorizer .Authorize (scopedRecord )
101
- if authorized != authorizer . DecisionAllow || err != nil {
102
- if ! ok || errors . IsUnauthorized ( err ) {
103
- glog . V ( 5 ). Infof ( "Unable to authorize: %v " , err )
104
- http . Error ( w , fmt . Sprintf ( "Forbidden: %s" , reason ), http . StatusForbidden )
105
- } else {
106
- glog . V ( 3 ). Infof ( "Unable to authorize: %v" , err )
107
- http . Error ( w , "Unable to authorize the user due to an error " , http . StatusInternalServerError )
108
- }
101
+ if err != nil {
102
+ glog . V ( 3 ). Infof ( "Unable to authorize: %v" , err )
103
+ http . Error ( w , "Unable to authorize the user due to an error " , http . StatusInternalServerError )
104
+ return
105
+ }
106
+ if authorized != authorizer . DecisionAllow {
107
+ glog . V ( 5 ). Infof ( "Unable to authorize: %v " , err )
108
+ http . Error ( w , fmt . Sprintf ( "Forbidden: %s" , reason ), http . StatusForbidden )
109
109
return
110
110
}
111
111
protected .ServeHTTP (w , req )
Original file line number Diff line number Diff line change @@ -260,9 +260,6 @@ var (
260
260
// these broke in the rebase, but everything else is working
261
261
`should function for intra-pod communication` ,
262
262
`should function for node-pod communication` ,
263
- // consistent 500 errors
264
- "should expose prometheus metrics for a route" ,
265
- "should expose the profiling endpoints" ,
266
263
// super flaky
267
264
"should only deploy the last deployment" ,
268
265
You can’t perform that action at this time.
0 commit comments