feat: 完善用户治理与登录白名单
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user