1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

fix: check subjects func (#8470)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2023-09-21 05:22:01 +02:00 committed by GitHub
parent b692e3b817
commit f38011cd8e
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: