mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
fix: role assignments list should include matched policies
This commit is contained in:
@@ -536,9 +536,13 @@ func intersect(s1 []string, s2 []string) bool {
|
||||
}
|
||||
|
||||
func containsIp(ips []netutils.IPV4Prefix, ipStr string) bool {
|
||||
if len(ipStr) == 0 {
|
||||
// user comes from unknown ip, assume matches
|
||||
return true
|
||||
}
|
||||
ip, err := netutils.NewIPV4Addr(ipStr)
|
||||
if err != nil {
|
||||
log.Errorf("invalid ipv4 addr %s: %s", ipStr, err)
|
||||
log.Errorf("user comes from invalid ipv4 addr %s: %s", ipStr, err)
|
||||
return false
|
||||
}
|
||||
for i := range ips {
|
||||
|
||||
Reference in New Issue
Block a user