[MM-46579] Add a limit for preferences (#21780)

* add a limit for preferences

* add limits to preferences

* add config to telemetry

* remove unneeded tags from config
Этот коммит содержится в:
Konstantinos Pittas
2023-01-12 13:17:53 +02:00
коммит произвёл GitHub
родитель 51ac81d816
Коммит 3ad240c167
10 изменённых файлов: 42 добавлений и 30 удалений

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

@@ -385,6 +385,7 @@ type ServiceSettings struct {
EnableCustomGroups *bool `access:"site_users_and_teams"`
SelfHostedPurchase *bool `access:"write_restrictable,cloud_restrictable"`
AllowSyncedDrafts *bool `access:"site_posts"`
ExperimentalMaxUserPreferences *int
}
func (s *ServiceSettings) SetDefaults(isUpdate bool) {
@@ -857,6 +858,10 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
if s.SelfHostedPurchase == nil {
s.SelfHostedPurchase = NewBool(true)
}
if s.ExperimentalMaxUserPreferences == nil {
s.ExperimentalMaxUserPreferences = NewInt(1000)
}
}
type ClusterSettings struct {