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

1806 Коммитов

Автор SHA1 Сообщение Дата
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
Christopher Poile
737bed311c MM-60115, MM-62436, MM-62493: Compliance export downloads from local and s3; e2e tests (#29806)
* add ZipReader method to filestore and file/s3 backends

to merge

to merge

* add WriteStreamResponse as an alternative to WriteFileResponse

* add generated layers

* enable download link; download job endpoint now streams export dir zips

* fix MM-62493

* re-enable e2e tests--we have download links, folks

* Add tests for ZipReader in filestore and s3store

* remove unnecessary error return on ZipReader

* little cleanup

* improve tests; some refactoring: s.Nil(err) -> s.NoError(err)

* blank commit

* backwards compatability for pre-10.5 job downloads

* compress file response; better errors; better comments; PR comments

* update generated app layers

* improve/widen tests; improve comments; simplify localstore ZipReader

* regenerate layers

* follow GoDoc conventions

* update generated layers

* remove unnecessary comment

* in jobs/job-id/download, clean exportDir before sending to ZipReader

* better comments; add an error return on ZipReader

* improve file permissions

* adjust tests for new error returns

* linting

* i18n
2025-01-27 09:28:07 +05:30
Jesse Hallam
d345e92136 Revert "[MM-62142] Avoid SELECT * in status_store.go (#29610)" (#29985)
This reverts commit 84a83a1e0f.
2025-01-23 18:01:18 +01:00
Julien Tant
b41b968eb8 restrict access to channel converstion to public for non team admin+ (#29819) 2025-01-23 09:42:20 -07:00
Matheus
291fe10784 [MM-62145] Migrating SELECT * queries for system_store.go (#29821)
* Step 1: Migrate any SELECT * queries written as strings into builder queries.

* Step 2: Migrate any instances of SELECT * into explicitly enumerating the needed columns

* revert `GetByName` to read from master as opposed to master.

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-23 11:06:36 -04:00
Claudio Costa
835b276ff0 [MM-62437] Fix flakyness in channel bookmark tests (#29893)
* Fix flakyness in channel bookmark tests

* Use existing util to initialize client

* Update server/channels/api4/apitestlib.go

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

* Remove redundant close

---------

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-23 10:16:21 -04:00
Sarthak0714
106cd66d69 migrate select * in thread_store.go (#29755)
* migrate select * in thread_store.go

* fix trailing whitespace

* reverted to single query

* maintained err handling pattern

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-23 10:10:17 -04:00
Miguel de la Cruz
7fb6901ad1 Adds Custom Profile Attributes API endpoints license check (#29906)
* Adds Custom Profile Attributes feature license and API endpoints check

* Fix linter

* Remove the specific license feature and fallback to checking for license presence

* Add translation

* Update the checks and tests to enable endpoints only for Enterprise licenses

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-23 09:50:43 +01:00
enzowritescode
077d0872e3 Fix LogAuditRecWithLevel doc comment and fix typo (#29980) 2025-01-22 21:39:31 -07:00
Weblate (bot)
4f62e7b3da Translations update from Mattermost Weblate (#29926)
* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/

* Translated using Weblate (German)

Currently translated at 98.9% (2564 of 2592 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/

* Translated using Weblate (German)

Currently translated at 100.0% (2592 of 2592 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/

* Translated using Weblate (Polish)

Currently translated at 99.0% (2568 of 2592 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/pl/

* Translated using Weblate (Russian)

Currently translated at 96.5% (2503 of 2592 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/ru/

* Translated using Weblate (German)

Currently translated at 100.0% (6020 of 6020 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/

* Translated using Weblate (Polish)

Currently translated at 100.0% (6020 of 6020 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Translated using Weblate (Russian)

Currently translated at 94.9% (5717 of 6020 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/ru/

* Translated using Weblate (Estonian)

Currently translated at 0.5% (33 of 6020 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/et/

* Translated using Weblate (Polish)

Currently translated at 100.0% (2592 of 2592 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/pl/

* Translated using Weblate (Czech)

Currently translated at 99.7% (2586 of 2592 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/cs/

* Translated using Weblate (Czech)

Currently translated at 100.0% (6020 of 6020 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/cs/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (6020 of 6020 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/sv/

* Translated using Weblate (Czech)

Currently translated at 100.0% (2592 of 2592 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/cs/

* Translated using Weblate (Ukrainian)

Currently translated at 95.0% (5723 of 6020 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 98.9% (2564 of 2592 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 95.0% (5723 of 6020 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 98.9% (2565 of 2592 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/uk/

* Translated using Weblate (Dutch)

Currently translated at 99.7% (2585 of 2592 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nl/

* Translated using Weblate (Dutch)

Currently translated at 99.9% (6019 of 6020 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nl/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2592 of 2592 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/ja/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (6020 of 6020 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/ja/

* Translated using Weblate (Dutch)

Currently translated at 99.7% (2586 of 2592 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nl/

* Translated using Weblate (Ukrainian)

Currently translated at 95.1% (5727 of 6020 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/

---------

Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Konstantin <eleferen@gmail.com>
Co-authored-by: Tormi <tormipeterson@gmail.com>
Co-authored-by: Martin Mičuda <micuda@rematiptop.cz>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: Serhii Khomiuk <sergiy.khomiuk@gmail.com>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-23 01:46:07 +00:00
Christopher Poile
e8eb279874 [MM-60888] Fix: Retention can cause unrelated files to be deleted (#29897)
* fix for deleting non-bulk export files and directories

* add job worker setup and running to helper_test.go

* add infrastructure for e2e testing of workers; test ExportDelete

* linting

* use retention days in test instead of magic number
2025-01-22 15:15:33 -05:00
Rajat Dabade
4ed702ccff Updated board prepackaged version to v9.0.5 (#29962) 2025-01-22 11:50:10 -05:00
Arya Khochare
84a83a1e0f [MM-62142] Avoid SELECT * in status_store.go (#29610)
* SELECT * to query builder

* execBuilder, manual column name and one more select * remaining instance

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-22 11:59:41 -04:00
Claudio Costa
0666c0a7ca Prepackage Calls v1.5.1 (#29950) 2025-01-22 08:08:11 -06:00
Christopher Poile
c205398040 [MM-60687] Log DoActionRequest requests to INFO (#29952)
* log DoActionRequest requests to INFO

* make generated
2025-01-21 20:02:39 -05:00
Antonis Stamatiou
c3fc894111 feat: Remove windows builds from releases (#29932) 2025-01-21 10:48:56 +02:00