feat: enforce tenant login IP whitelists

This commit is contained in:
richjohnrambo
2026-09-09 09:40:37 +08:00
parent 9ac2b412cc
commit 92a72d1bea
4 changed files with 198 additions and 2 deletions
+3
View File
@@ -1147,6 +1147,9 @@ func (s *Session) login(msg *ClientComMessage) {
if err == nil && rec.State != types.StateOK {
err = types.ErrPermissionDenied
}
if err == nil {
err = checkTenantLoginIPWhitelist(s.tenantID, s.platf, s.remoteAddr)
}
if err == nil {
err = checkUserLoginIPWhitelist(s.tenantID, rec.Uid, s.remoteAddr)
}