modified: staging/src/k8s.io/apiserver/pkg/endpoints/filters/authorization.go

This commit is contained in:
WanLinghao
2018-01-31 14:21:42 +08:00
parent 5911f87dad
commit 983435bdce

View File

@@ -47,6 +47,7 @@ func WithAuthorization(handler http.Handler, requestContextMapper request.Reques
return
}
authorized, reason, err := a.Authorize(attributes)
// an authorizer like RBAC could encounter evaluation errors and still allow the request, so authorizer decision is checked before error here.
if authorized == authorizer.DecisionAllow {
handler.ServeHTTP(w, req)
return