mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-28 04:35:04 -04:00
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`.
This commit is contained in:
parent
ebe03c1d45
commit
d2188ce1dd
1 changed files with 1 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue