mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-15 06:43:54 +00:00
add err info to authorize in psp
This commit is contained in:
parent
db867c0c9d
commit
35d926d8d3
@ -337,7 +337,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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user