From 9b096521338d66a2625e59ffa48353893494f6d6 Mon Sep 17 00:00:00 2001 From: Maria A Nunez Date: Mon, 29 Jan 2024 09:56:49 -0500 Subject: [PATCH] Update user limits error code (#26059) * Updated user limits error code * Webapp changes --- server/channels/app/user.go | 4 ++-- .../announcement_bar/users_limits_announcement_bar/index.tsx | 2 +- webapp/channels/src/i18n/en.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/channels/app/user.go b/server/channels/app/user.go index 3607e2c50e..afc9e5d1e1 100644 --- a/server/channels/app/user.go +++ b/server/channels/app/user.go @@ -325,7 +325,7 @@ func (a *App) createUserOrGuest(c request.CTX, user *model.User, guest bool) (*m mlog.Error("Error fetching user limits in createUserOrGuest", mlog.Err(appErr)) } else { if userLimits.ActiveUserCount > userLimits.MaxUsersLimit { - mlog.Warn("ERROR_USER_LIMITS_EXCEEDED: Created user exceeds the total activated users limit.", mlog.Int("user_limit", userLimits.MaxUsersLimit)) + mlog.Warn("ERROR_SAFETY_LIMITS_EXCEEDED: Created user exceeds the total activated users limit.", mlog.Int("user_limit", userLimits.MaxUsersLimit)) } } @@ -1049,7 +1049,7 @@ func (a *App) UpdateActive(c request.CTX, user *model.User, active bool) (*model mlog.Error("Error fetching user limits in UpdateActive", mlog.Err(appErr)) } else { if userLimits.ActiveUserCount > userLimits.MaxUsersLimit { - mlog.Warn("ERROR_USER_LIMITS_EXCEEDED: Activated user exceeds the total active user limit.", mlog.Int("user_limit", userLimits.MaxUsersLimit)) + mlog.Warn("ERROR_SAFETY_LIMITS_EXCEEDED: Activated user exceeds the total active user limit.", mlog.Int("user_limit", userLimits.MaxUsersLimit)) } } } diff --git a/webapp/channels/src/components/announcement_bar/users_limits_announcement_bar/index.tsx b/webapp/channels/src/components/announcement_bar/users_limits_announcement_bar/index.tsx index b29519ee58..dc2aa7f1b4 100644 --- a/webapp/channels/src/components/announcement_bar/users_limits_announcement_bar/index.tsx +++ b/webapp/channels/src/components/announcement_bar/users_limits_announcement_bar/index.tsx @@ -43,7 +43,7 @@ function UsersLimitsAnnouncementBar(props: Props) { message={ } type={AnnouncementBarTypes.CRITICAL} diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json index 4d552af75b..ed12820a23 100644 --- a/webapp/channels/src/i18n/en.json +++ b/webapp/channels/src/i18n/en.json @@ -5712,7 +5712,7 @@ "userGuideHelp.mattermostUserGuide": "Mattermost user guide", "userGuideHelp.reportAProblem": "Report a problem", "userGuideHelp.trainingResources": "Training resources", - "users_limits_announcement_bar.copyText": "User limits exceeded. Contact administrator with: ERROR_USER_LIMITS_EXCEEDED", + "users_limits_announcement_bar.copyText": "User limits exceeded. Contact administrator with: ERROR_SAFETY_LIMITS_EXCEEDED", "users_limits_announcement_bar.ctaText": "Learn More", "userSettingsModal.pluginPreferences.header": "PLUGIN PREFERENCES", "version_bar.new": "A new version of Mattermost is available.",