Граф коммитов

1821 Коммитов

Автор SHA1 Сообщение Дата
Ben Schumacher
d3dcc74e5a [MM-62762] Make config location in Support Packet human-readable (#30027)
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-11 10:06:27 +01:00
Weblate (bot)
dc37cf5cf9 Translations update from Mattermost Weblate (#30157)
Automatic Merge
2025-02-10 19:50:10 +02:00
Maria A Nunez
7efdcda20a Update User Limits for unlicensed servers (#30134)
* Update user soft and hard limits

* Fix testt

* Fix test
2025-02-10 11:55:42 -05:00
Arya Khochare
f6c4bdf365 [MM-62149] Avoid SELECT * in emoji_store.go (#30082)
* refractored select sql queries

* rm unused makeStringArgs

* linting

* leverage builder pattern

---------

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2025-02-10 12:02:50 -04:00
Ben Schumacher
0927ecb0f1 [MM-62517] Add audit logs to Support Packet (#29844) 2025-02-10 11:32:04 +01:00
Rahim Rahman
55c2d57f70 fix(MM-60645): missing emoji on mobile (#30001)
* fix(MM-60645): missing emoji on mobile

* removing the `:` completely from being stored or being sent to the server.

* proper formatting?
2025-02-09 21:38:29 -07:00
Agniva De Sarker
3698808625 MM-62926: Fix standard logger redirection issue (#30137)
We were redirecting any logging happening via the Go standard logger
to our own mlog instance. The issue is that all those logs were happening
at LvlStdLog level which is higher than LvlDebug.

LvlStdLog is at 10, and LvlDebug is at 5. So unless a customer
sets the log level specifically to "stdlog" or sets up advanced
logging to specifically log for that level, no standard logs will
ever get logged.

We fix this by logging it at warn level. The reason for warn
is that mostly external libraries use this facility to log
out-of-band errors that could not be returned using standard
error returns.

I saw another plugin error which was logged similarly. This
was never surfaced before due to this bug.

https://mattermost.atlassian.net/browse/MM-62926

```release-note
NONE
```
2025-02-08 22:28:04 +05:30
Rajat Dabade
9f5b13d55d Upgraded boards version to v9.1.1 for prepackaged (#30072)
* Upgraded boards version to v9.1.0

* Update server/Makefile

Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>

---------

Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
2025-02-08 13:07:26 +05:30
Arya Khochare
b11d536774 [MM-62152] Avoid SELECT * in oauth_store.go (#30080)
* refractored select queries

* test fail fix

* linting issues

* use builder pattern

* simplify GetAuthorizedApps

* revert to base behaviour

---------

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2025-02-07 16:38:49 -04:00
Agniva De Sarker
0bdae41603 MM-61215: Clarify to use --bypass-upload flag (#29761)
https://mattermost.atlassian.net/browse/MM-61215

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-07 22:12:33 +05:30
Arya Khochare
50258a6510 [MM-62153] Avoid SELECT * in preference_store.go (#30081)
* refractored sql queries

* GetBuilder to Select Builder as preferences is slice (fix failing test)

* test: Add test for GetCategoryAndName preference method

* fix s/GetBuilder/SelectBuilder

* linting

* make mocks

* make store-layers

---------

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2025-02-07 12:05:29 -04:00
Ibrahim Serdar Acikgoz
a3f22bd349 [MM-62004] update threads after a channel gets moved (#29624) 2025-02-07 15:20:13 +00:00
unified-ci-app[bot]
144986c1ad Update latest minor version to 10.6.0 (#30138)
Automatic Merge
2025-02-07 11:20:09 +02:00
Jesse Hallam
7d9521d783 MM-62142: remove SELECT * from status store (round 2) (#30060)
* Revert "Revert "[MM-62142] Avoid SELECT * in status_store.go (#29610)" (#29985)"

This reverts commit d345e92136.

* add tests for StatusGet and StatusGetByIds

* handle NULL columns in the Status Store

* simplify status store

* more builder simplifications and tests

* expose GetQueryPlaceholder

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-06 12:36:31 -04:00
Agniva De Sarker
c4718e4542 MM-60211: Bump dependencies (#30005)
https://mattermost.atlassian.net/browse/MM-60211
```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-06 21:48:08 +05:30
Agniva De Sarker
d34dcc2dda MM-62901: Apply constLabels on all metrics (#30125)
When the client side metrics were added constLabels
got missed out. Without this, we cannot do the high
level grouping by rings.

https://mattermost.atlassian.net/browse/MM-62901

```release-note
NONE
```
2025-02-06 21:45:57 +05:30
Christopher Poile
50c7f1df12 [MM-62876] Bulk export warnings (#30105)
* err -> appErr

* record warnings in job.Data, and output them to warnings.txt

* tests
2025-02-06 10:34:34 -05:00
Harshil Sharma
35e776d805 Removed Elasticsearch and Opensearch channel index schedma check (#30102) 2025-02-06 11:50:37 +05:30
Christopher Poile
8b65771a31 [MM-62897] Compliance export backwards compatibility (#30120)
* add backwards compatibility for <10.5

* test: backwards compatibility for <10.5

* spelling
2025-02-05 21:20:28 +00:00
Christopher Poile
1ce29f8466 [MM-60989] Add SelectBuilderCtx to simplify db code (#29988)
* add SelectBuilderCtx; change the few calls where it's appropriate to use

* tests (wip)

* tests improved

* use SelectCtx's own WithTimeout

* improve tests based on PR feedback

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-05 16:06:43 -05:00
Jesse Hallam
f08580ec09 t.Skip flaky TestUpdateOAuthApp (#30118)
Fixes: https://mattermost.atlassian.net/browse/MM-62895
2025-02-05 17:25:51 +00:00
Julien Tant
bcc395d139 [MM-62552] Custom Profile Attributes: use json.RawMessage for the value. (#29989)
* refactor: Move property value sanitization to model layer

* feat: Add value sanitization for custom profile attributes

* refactor: Update custom profile attributes to use json.RawMessage

* refactor: Update patchCustomProfileAttribute to handle json.RawMessage directly

* refactor: Refactor custom profile attributes handler with improved validation

* refactor: Rename `patchCustomProfileAttribute` to `patchCPAValues`

* refactor: Replace ReturnJSON with json.NewEncoder and add error logging

* feat: Add encoding/json import to property_value.go

* refactor: Update property value tests to use json.RawMessage

* fix: Convert string value to json.RawMessage in property value test

* fix: Convert string literals to json.RawMessage in property value tests

* fix: Add missing encoding/json import in custom_profile_attributes.go

* fix: Preserve JSON RawMessage type in listCPAValues function

* fix: Update custom profile attributes test to use json.RawMessage

* feat: Add json import to custom_profile_attributes_test.go

* refactor: Update ListCPAValues and PatchCPAValues to use json.RawMessage

* refactor: Rename `actualValue` to `updatedValue` in custom profile attributes test

* refactor: Improve user permission and audit logging for custom profile attributes patch

* refactor: Optimize CPA field lookup by using ListCPAFields() and map

* fix: Correct user ID reference in custom profile attributes patch endpoint

* refactor: Change patchCPAValues to use map[string]json.RawMessage for results

* refactor: format and fix tests

* test: Add comprehensive unit tests for sanitizePropertyValue function

* test: Add test case for invalid property value type

* feat: Use `model.NewId()` to generate valid IDs in custom profile attributes tests

* refactor: Replace hardcoded IDs with dynamic variables in custom profile attributes test

* refactor: restore variable name

* refactor: drop undesired changes

* chore: refresh app layers

* feat: Update API definition to support string or string array values for custom profile attributes

* test: Add test cases for multiselect custom profile attribute values

* test: Add tests for multiselect custom profile attribute values

* test: Isolate array value test in separate t.Run

* test: Add test case for multiselect array values in custom profile attributes

* refactor: Move array value test from TestCreateCPAField to TestPatchCPAValue

* test: Update custom profile attributes test assertions

* test: add test case for handling array values in GetCPAValue

* test: Add array value tests for property value store

* refactor(store): no need to convert to json the rawmessage

* chore: lint

* i18n

* use model to interface with sqlx

* fix: Allow empty strings for text, date, and select profile attributes

* refactor: Filter out empty strings in multiselect and multiuser fields

* refactor: Update multiuser field sanitization to validate and error on invalid IDs

* refactor: Simplify sanitizePropertyValue function with reduced code duplication

* fix: Allow empty user ID in custom profile attribute sanitization

* refactor: Convert comment-based subtests to nested t.Run in TestSanitizePropertyValue

* refactor: Convert comment-based subtests to nested t.Run tests in TestSanitizePropertyValue

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-05 17:21:22 +00:00
Christopher Poile
6560b4c0cf [MM-62845] Fix: Compliance export download link fails from S3 when using a dedicated file store (#30092)
* add ExportZipReader and use that for job exports

* fix legacy code to use ExportFileReader
2025-02-05 07:31:07 -05:00
Christopher Poile
3a73b517e2 [MM-62775] Fix: Bulk export not completing (#30044)
* do not error on exportFile error

* add tests for local and s3 storage exporting with missing file

* linting

* fix attachment path validation in mmctl
2025-02-04 17:56:11 -05:00
Caleb Roseland
f52e08754c MM-62050: restrict channel bookmarks in archived channels (#29490) 2025-02-04 15:10:32 -06:00
Agniva De Sarker
ae9e6174e5 [AI assisted]: Improve system console statistics performance (#29899)
```release-note
NONE
```

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
2025-02-04 21:54:01 +05:30
Weblate (bot)
6046a304b2 Translations update from Mattermost Weblate (#30091)
Automatic Merge
2025-02-03 21:50:09 +02:00
Claudio Costa
316cde2569 [MM-62191] Remove disintegration/imaging dependency (#29657)
* Remove disintegration/imaging dependency

* Simplify FillCenter logic

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-03 11:04:00 +05:30
Agniva De Sarker
341f919fa8 MM-62782: Bumping minimum Postgres version to 13 (#30039)
As discussed in https://docs.mattermost.com/install/prepare-mattermost-database.html#minimum-supported-version-policy

https://mattermost.atlassian.net/browse/MM-62782

```release-note
Minimum postgres version has been bumped to 13.
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-31 09:57:35 +05:30
enzowritescode
dde07f6a3c Remove obsolete docker version (#30040)
* Remove obsolete docker version from Docker files and docker composer generator
2025-01-30 12:53:25 -07:00
Scott Bishel
369b9fa96b Prompt Team Admin before joining private channel (#29955)
* Prompt Team Admin before joining private channel

* fix and implement prompt when team admin joins via channel link

* update premission check and unit tests

* remove comment

* clean up some code

* update check to fix E2E tests
2025-01-30 08:21:09 -07:00
Scott Bishel
f2af360401 MM-62500 - Apply Delete check on commands (#29896)
* apply delete check on commands, add tests

* combine tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-30 08:20:36 -07:00
Mario Vitale
1f34d784dd Mirror postgres-13 image (#30047)
* Mirror postgres-13 image
2025-01-30 15:18:09 +01:00
Miguel de la Cruz
8c3490b3d8 Skip racy test on api4.TestCreatePost (#30029)
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-30 11:07:10 +00:00
Miguel de la Cruz
9f172fed70 Update the property field model to interface with SQLX (#29987)
* Update the property field model to interface with SQLX

* Fix tests
2025-01-30 03:32:24 +00:00
AulakhHarsh
bec3bbf88f add e2e tests for sendPasswordResetEmail cmd (#29907) 2025-01-29 23:29:37 +00:00
Christopher Poile
28c561d643 [MM-62179] Fix: mmctl debug error when setting email (#29953)
* only GetUserByEmail if arg is an email

* fixing tests

* fix typo
2025-01-29 23:45:11 +01:00
Julien Tant
05ca61c784 Fix Mafile layers definition (#30043) 2025-01-29 20:06:55 +00:00
kshitij katiyar
291feba75c Bump prepackage Jira plugin version to 4.2.0 (#30037)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2025-01-29 20:12:46 +01:00
Claudio Costa
528026d6fb Use CreateConnectedWebSocketClient test util (#30036) 2025-01-29 07:58:43 -06:00
Jesús Espino
f1acdce42c Removing opentracing (#29965)
* Removing opentracing

* Fixing CI
2025-01-29 07:45:13 +01:00
Doug Lauder
565c8aa42d Audit usage of the searchPosts API (#29909)
* Audit calls to searchPosts API

* Update server/public/model/post_search_results.go

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

* Update server/public/model/post_search_results.go

* Update server/public/model/post_search_results.go

---------

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-28 22:21:05 -05:00
Christopher Poile
87ea6d8b1c [MM-62537] Fix: Integration action nil ptr dereference (#29986)
* guard against nil dereference; lock down with tests

* fix test name
2025-01-28 13:46:12 -05:00
Agniva De Sarker
afbd9d64c3 [AI assisted]: MM-62295: Search and index archived channels as well. (#29796)
We add a new field delete_at in the channels template.

This field is then searched in the SearchChannels function.

Also added tests to verify that archived channels are searched
properly, and also indexed correctly.

https://mattermost.atlassian.net/browse/MM-62295

```release-note
- Now archived channels are searchable with ES/OS if TeamSettings.ExperimentalViewArchivedChannels is enabled.
- If there are old channels which were archived before a bulk index was run, users would need to purge indexes, and do bulk index again. Because those old archived channels are removed from the index when a bulk index is run.
```


Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-28 19:44:55 +05:30
Devin Binnie
64070b0780 [MM-62541] Exclude files not attached to a post from the file count for a channel (#29976)
* [MM-62541] Exclude files not attached to a post from the file count for a channel

* Added test to ensure that we only grab files with a post id
2025-01-28 08:17:11 -05:00
Weblate (bot)
79299b9f66 Translations update from Mattermost Weblate (#30012)
Automatic Merge
2025-01-28 11:50:19 +02:00
Ben Schumacher
d8d65b8ec7 [MM-62079] Rewrite TestCreatePost (#29903) 2025-01-28 10:02:03 +01:00
Julien Tant
8b5a3e6217 [MM-62502] Ensure MFA Check on search routes (#29880) 2025-01-27 18:03:16 +00:00
Scott Bishel
b26c43e716 Permission changes (#29570)
* update permission mistakes

* add getAnalytics to TeamStatistics

* add PermissionGetAnalytics to ReadTeamStatistics

* add mocks for migrations

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-27 16:28:27 +00:00
Seiya Homma
a5faf9e6e3 [MM-61775] Fix errcheck issues in server/channels/app/platform/web_broadcast_hook.go (#29514)
Co-authored-by: Caleb Roseland <caleb@calebroseland.com>
2025-01-27 11:26:28 +00:00