break the pointless loop when group matched
Signed-off-by: guoyao <1015105054@qq.com>
This commit is contained in:
parent
0e260a027b
commit
a49af6cd1c
@ -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