feat: 完善用户治理与登录白名单

This commit is contained in:
richjohnrambo
2026-09-08 10:55:26 +08:00
parent d239bd9ad0
commit 8116fb6fe8
8 changed files with 196 additions and 8 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 = checkUserLoginIPWhitelist(s.tenantID, rec.Uid, s.remoteAddr)
}
if err != nil {
recordSessionLoginFailure(s, msg.Login.Scheme, msg.Login.Secret, rec, msg.Id, err, msg.Timestamp)