Merge pull request #105598 from gy95/match

break the pointless loop when group matched
This commit is contained in:
Kubernetes Prow Robot
2022-01-05 09:22:38 -08:00
committed by GitHub

View File

@@ -164,6 +164,7 @@ func subjectMatches(p abac.Policy, user user.Info) bool {
for _, group := range groups {
if p.Spec.Group == group {
matched = true
break
}
}
if !matched {