1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-04-09 10:42:22 +00:00

fix: check subjects func (#8470) (#8481)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
gcp-cherry-pick-bot[bot] 2023-09-21 03:54:49 +00:00 committed by GitHub
parent 7a49dc8820
commit 3a8f1df20c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,10 +7,7 @@ import (
)
// CheckSubjects return true if one of ruleSubjects exist in userInfo
func CheckSubjects(
ruleSubjects []rbacv1.Subject,
userInfo authenticationv1.UserInfo,
) bool {
func CheckSubjects(ruleSubjects []rbacv1.Subject, userInfo authenticationv1.UserInfo) bool {
for _, subject := range ruleSubjects {
switch subject.Kind {
case rbacv1.ServiceAccountKind: