Update User Limits for unlicensed servers (#30134)

* Update user soft and hard limits

* Fix testt

* Fix test
Этот коммит содержится в:
Maria A Nunez
2025-02-10 11:55:42 -05:00
коммит произвёл GitHub
родитель f6c4bdf365
Коммит 7efdcda20a
4 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@@ -12,8 +12,8 @@ import (
)
const (
maxUsersLimit = 5_000
maxUsersHardLimit = 11_000
maxUsersLimit = 2_500
maxUsersHardLimit = 5_000
)
func (a *App) GetServerLimits() (*model.ServerLimits, *model.AppError) {

Просмотреть файл

@@ -20,7 +20,7 @@ func TestGetServerLimits(t *testing.T) {
// InitBasic creates 3 users by default
require.Equal(t, int64(3), serverLimits.ActiveUserCount)
require.Equal(t, int64(5000), serverLimits.MaxUsersLimit)
require.Equal(t, int64(2500), serverLimits.MaxUsersLimit)
})
t.Run("user count should increase on creating new user and decrease on permanently deleting", func(t *testing.T) {

Просмотреть файл

@@ -2306,7 +2306,7 @@ func TestCreateUserOrGuest(t *testing.T) {
defer th.TearDown()
id := NewTestId()
userCreationMocks(t, th, id, 11000)
userCreationMocks(t, th, id, 5000)
user := &model.User{
Email: "TestCreateUserOrGuest@example.com",

Просмотреть файл

@@ -76,7 +76,7 @@ describe('getServerLimits', () => {
test('should return data if user is admin', async () => {
const userLimits: ServerLimits = {
activeUserCount: 600,
maxUsersLimit: 5_000,
maxUsersLimit: 2_500,
};