[MM-55017] Add API method to get users for Admin Reporting (#25499)

* Add store method to get reporting data

* Some store changes

* Added app layer

* Added API call, some miscellaneous fixes

* Fix lint

* Fix serialized check

* Add API docs

* Fix user store tests leaking users

* Fix test

* PR feedback

* Add filtering for role/team/activated user, filter out bot users

* Fix mock

* Fix test

* Oops

* Switch to using struct filter

* More PR feedback

* Fix gen

* Fix test

* Fix API docs

* Fix test

* Fix possible SQL injection, some query optimization

* Fix migrations

* Oops

* Add role to API

* Fix check

* Add Client4 API call for load testing

* Fix test

* Update server/channels/store/storetest/user_store.go

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>

* PR feedback

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Этот коммит содержится в:
Devin Binnie
2023-12-08 10:30:08 -05:00
коммит произвёл GitHub
родитель 7afc14de36
Коммит 109f4643c6
26 изменённых файлов: 2399 добавлений и 1 удалений

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

@@ -2016,6 +2016,14 @@
"id": "api.getThreadsForUser.bad_params",
"translation": "Before and After parameters to getThreadsForUser are mutually exclusive"
},
{
"id": "api.getUsersForReporting.invalid_active_filter",
"translation": "Cannot hide both active and inactive users."
},
{
"id": "api.getUsersForReporting.invalid_team_filter",
"translation": "Invalid team id provided."
},
{
"id": "api.image.get.app_error",
"translation": "Requested image url cannot be parsed."
@@ -7054,10 +7062,26 @@
"id": "app.user.get_unread_count.app_error",
"translation": "We could not get the unread message count for the user."
},
{
"id": "app.user.get_user_report.invalid_sort_column",
"translation": "Provided sort column is not valid."
},
{
"id": "app.user.get_user_report.store_error",
"translation": "There was an error querying the user report."
},
{
"id": "app.user.get_users_batch_for_indexing.get_users.app_error",
"translation": "Unable to get the users batch for indexing."
},
{
"id": "app.user.get_users_for_reporting.bad_date_range",
"translation": "Date range provided is invalid."
},
{
"id": "app.user.get_users_for_reporting.invalid_page_size",
"translation": "Page size is invalid or too large."
},
{
"id": "app.user.missing_account.const",
"translation": "Unable to find the user."