[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
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
51ac81d816
Коммит
3ad240c167
@@ -33,7 +33,8 @@ func (w *preferencesServiceWrapper) DeletePreferencesForUser(userID string, pref
|
||||
}
|
||||
|
||||
func (a *App) GetPreferencesForUser(userID string) (model.Preferences, *model.AppError) {
|
||||
preferences, err := a.Srv().Store().Preference().GetAll(userID)
|
||||
limit := *a.Config().ServiceSettings.ExperimentalMaxUserPreferences
|
||||
preferences, err := a.Srv().Store().Preference().GetAll(userID, limit)
|
||||
if err != nil {
|
||||
return nil, model.NewAppError("GetPreferencesForUser", "app.preference.get_all.app_error", nil, "", http.StatusBadRequest).Wrap(err)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user