mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 19:28:16 +00:00
Merge pull request #38805 from xilabao/add-err-info-to-authorize-in-psp
Automatic merge from submit-queue add err info to authorize in psp It's unwise to ignore the err in my view.
This commit is contained in:
@@ -304,7 +304,10 @@ func authorizedForPolicy(info user.Info, policy *extensions.PodSecurityPolicy, a
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
attr := buildAttributes(info, policy)
|
attr := buildAttributes(info, policy)
|
||||||
allowed, _, _ := authz.Authorize(attr)
|
allowed, reason, err := authz.Authorize(attr)
|
||||||
|
if err != nil {
|
||||||
|
glog.V(5).Infof("cannot authorized for policy: %v,%v", reason, err)
|
||||||
|
}
|
||||||
return allowed
|
return allowed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user