Merge pull request #105598 from gy95/match
break the pointless loop when group matched
This commit is contained in:
commit
24a43bc6a6
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user