remove spurious user limits log (#33038)
Only log a warning when the created user exceeds the `MaxUserLimits` if `MaxUsersLimit > 0`. This was showing up spuriously on licensed servers for which no limit applied. Note that this is distinct from blocking user creation past `MaxHardUsersLimit`.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ebe03c1d45
Коммит
d2188ce1dd
@@ -335,7 +335,7 @@ func (a *App) createUserOrGuest(c request.CTX, user *model.User, guest bool) (*m
|
||||
// So, we log the error, not return
|
||||
c.Logger().Error("Error fetching user limits in createUserOrGuest", mlog.Err(limitErr))
|
||||
} else {
|
||||
if userLimits.ActiveUserCount > userLimits.MaxUsersLimit {
|
||||
if userLimits.MaxUsersLimit > 0 && userLimits.ActiveUserCount > userLimits.MaxUsersLimit {
|
||||
// Use different warning messages based on whether server is licensed
|
||||
if a.License() != nil {
|
||||
c.Logger().Warn("ERROR_LICENSED_USERS_LIMIT_EXCEEDED: Created user exceeds the maximum licensed users.", mlog.Int("user_limit", userLimits.MaxUsersLimit))
|
||||
|
||||
Ссылка в новой задаче
Block a user