mirror of https://github.com/k3s-io/k3s
add err info to authorize in psp
parent
db867c0c9d
commit
35d926d8d3
|
@ -337,7 +337,10 @@ func authorizedForPolicy(info user.Info, policy *extensions.PodSecurityPolicy, a
|
|||
return true
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue