MM 55199 Limit User Preferences (#25579)

* limit size and number of preferences in updatePreferences

* update unit tests

* fix another location and add tests

* update utility function to return an error

* update unit tests

* fix review comments

* revert package-lock.json

* more review mods

* update number of preferences allowed

* update unit tests for new limit

* update name of config setting

* Update server/public/model/utils.go

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>

* add check for error id

* use existing utility function, remove model.ObjectFromJSON()

* Update preference.go - remove blank line

---------

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Scott Bishel
2024-02-01 15:33:24 -07:00
committed by GitHub
parent a57be19da4
commit a38c1c54b4
3 changed files with 90 additions and 4 deletions

View File

@@ -59,6 +59,8 @@
type: array
items:
$ref: '#/components/schemas/Preference'
minItems: 1
maxItems: 100
responses:
"200":
description: User preferences saved successful
@@ -102,6 +104,8 @@
type: array
items:
$ref: '#/components/schemas/Preference'
minItems: 1
maxItems: 100
responses:
"200":
description: User preferences saved successful