Commit Graph

22061 Commits

Author SHA1 Message Date
Harshil Sharma 390213ab64 Merge branch 'master' into redacted_url_message_composition 2026-03-04 10:16:06 +05:30
sabril 72460bff61 fix: datetime and edit specs (#35455)
* fix: datetime and edit specs

* update per suggestion

* as commented
2026-03-04 11:30:36 +08:00
Ben Cooke 3726e87ef2 [MM-67749] Fix enter key issue for AI rewrite (#35449) 2026-03-03 22:11:14 -05:00
sabril a7930cc782 fix: flaky flag-messages.spec (#35453) 2026-03-04 10:16:11 +08:00
Jesse Hallam c462720186 [MM-65822] Add directory conflict checks for plugin and import uploads (#34681)
* [MM-66789] Add directory conflict checks for plugin and import uploads

Prevent security issues where plugin uploads could write into the import
directory (or subdirectories) and vice versa by adding validation checks
at the REST API level when uploading plugins or creating import uploads.

* improved handling of root directories

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-03-03 16:31:05 -04:00
Mattermost Build 27d054c4d3 Prepackage Playbooks FIPS v2.7.0 (#35450) (#35456)
Automatic Merge
2026-03-03 09:25:21 +01:00
Domenico Rizzo 8dbfb87877 MM-29974 Adds e2e tests to the plugin list command (#34866)
* Adds e2e tests to the plugin list command

Adds end-to-end tests to the pluginListCmdF function.
These tests verify scenarios where appropriate permissions
are not available, plugins are disabled, and success cases.

* Updates plugin list command E2E tests

Removes the `pluginArg` from `pluginListCmdF` calls within end-to-end tests.
Ensures test cases accurately evaluate the `pluginListCmdF` behavior when no specific plugin name is provided as an argument, improving test coverage for default listing scenarios.

Relates to MM-29974

* Simplifies plugin test defer cleanup

Refactors defer statements in plugin E2E tests to directly call `s.th.App.UpdateConfig`.
Removes redundant anonymous function wrappers, making the test cleanup code cleaner and more concise.

Relates to MM-29974

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-03-03 07:40:58 +00:00
Pablo Vélez 592408261e MM-67754 - Fix ABAC E2E tests flakiness in Enterprise CI environment (#35452) 2026-03-03 11:07:17 +08:00
Ben Cooke 7a0f83ba72 [MM-67681] Hit the right caches for Channels.GetMany and Channels.getByNames (#35399) 2026-03-02 20:33:14 -05:00
Weblate (bot) 2edc2f2c05 Translations update from Mattermost Weblate (#35446)
* Translated using Weblate (Polish)

Currently translated at 100.0% (2977 of 2977 strings)

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

* Translated using Weblate (Polish)

Currently translated at 95.4% (6731 of 7053 strings)

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

* Translated using Weblate (Polish)

Currently translated at 95.7% (6751 of 7053 strings)

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

* Translated using Weblate (German)

Currently translated at 100.0% (2977 of 2977 strings)

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

* Translated using Weblate (Dutch)

Currently translated at 99.8% (2972 of 2977 strings)

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

* Translated using Weblate (German)

Currently translated at 98.5% (6948 of 7053 strings)

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

* Translated using Weblate (Dutch)

Currently translated at 99.9% (2976 of 2977 strings)

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

* Translated using Weblate (Dutch)

Currently translated at 99.8% (7040 of 7053 strings)

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

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 77.4% (5463 of 7053 strings)

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

* Translated using Weblate (Dutch)

Currently translated at 100.0% (7053 of 7053 strings)

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

* Translated using Weblate (Polish)

Currently translated at 96.0% (6771 of 7053 strings)

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

---------

Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Frank Paul Silye <frankps@gmail.com>
2026-03-02 13:15:11 +00:00
Daniel Espino García 5fdec79007 [MM-67640] Fix checks around autotranslations permission (#35351)
Automatic Merge
2026-03-02 10:09:28 +01:00
Doug Lauder 8a4632e330 Fix flaky unit tests for TestClientCreateOutgoingOAuthConnection (#35152) 2026-03-01 18:28:42 +01:00
Maria A Nunez e6cd18c90b Fix IntuneSettings config access tags to use correct permission ID (#35414)
IntuneSettings fields had access:"mobile_intune" tags, but no matching
permission exists in AllPermissions. Changed to "environment_mobile_security"
to match the existing permissions defined in permission.go.

Also added TestConfigAccessTagsMapToValidPermissions to validate all config
access tags resolve to real permissions.

Jira https://mattermost.atlassian.net/browse/MM-67693

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-27 17:53:11 -05:00
Alejandro García Montoro fa7668ae0d MM-67668: Replace Promtail with OpenTelemetry collector (#35381)
* Add container name to Docker logs

This will allow for querying Loki by container's name:

  {job="docker",container_name="mattermost-postgres"}

* Configue Loki to prepare for OTLP ingestion

- Add a volume to Loki container to get the config
- Configure Loki with the expected labels so that we can query by job,
  app, container.name...

* Add OpenTelemetry collector configuration

There are three pipelines:
1. logs/mattermost scrapes the logs from mattermost.log, parsing the
   timestamp and severity, and pushes them to Loki.
2. logs/docker scrapes the Docker logs from *-json.log, parsing the
   timestamp, the log itself and the container name, and pushes them to Loki.
3. metrics/docker scrapes the Docker socket to retrieve the containers'
   uptime values and pushes them to Prometheus.

* Replace Promtail with OpenTelemetry collector

* Update build tooling for OpenTelemetry collector

1. Make sure that the logs directory is created
2. Swap Promtail with OpenTelemetry collector

* Scrape collector to get Docker stats

Prometheus needs to scrape the OpenTelemetry collector in the exposed
port to get the Docker stats, so that we can query the uptime with
metric container_uptime_seconds, which has a container_name label to
filter by container.

* Update Grafana dashboard for Docker health checks

1. Use Prometheus as the datasource in all queries
2. Simplify the mappings to either 0 (offline, red) or 1 (online,
   green).
3. Unify all queries on container_uptime_seconds, filtering by
   container_name, and making sure that the latest value we got is at most
   15 seconds old, so that it does not show stale data.
4. Add Redis health check, that was missing
5. Update the dashboard title to Docker containers

* Tune Loki and OTel collector configs for local dev

- Switch filelog receivers to start_at: beginning so existing logs are
  ingested on collector startup, not just new entries.
- Fix Docker log timestamp layout to use 9s (variable-length nanos)
  instead of 0s (fixed-width), matching actual Docker JSON log format.
- Add ingester max_chunk_age to keep chunks open longer in the
  single-instance dev setup, so that we can ingest older logs (the
  window is max_chunk_age/2).
- Relax Loki limits for local development: allow unordered writes,
  disable old-sample rejection, and raise ingestion rate/burst to 64 MB
  to avoid throttling during bulk ingest.
2026-02-27 16:48:17 +01:00
Harrison Healey 96226a9761 MM-67659 Fix marking threads as read over the WebSocket (#35384)
* MM-67659 Fix handleThreadReadChanged not working when unread_mentions or unread_replies is 0

* Update type definition for ThreadReadChanged

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-02-27 10:42:23 -05:00
Bill Gardner 8069cae8f8 Update plugin-calls to v1.11.1 (#35427) 2026-02-26 16:38:34 -05:00
Eva Sarafianou 24d3fed777 Update filippo.io/edwards25519 (#35422) 2026-02-25 11:27:48 -05:00
Ben Schumacher 60fbce7d03 [MM-67671] Add CJK Post search support for PostgreSQL (#35260)
Add LIKE-based CJK (Chinese, Japanese, Korean) search support for PostgreSQL, gated behind a `CJKSearch` feature flag.

PostgreSQL's built-in full-text search (`to_tsvector`/`to_tsquery`) does not support CJK languages because it relies on whitespace-based tokenization, which doesn't work for logographic/syllabic scripts that don't use spaces between words. This PR adds a `LIKE`-based fallback for search terms containing CJK characters.

**How it works:** When the `CJKSearch` feature flag is enabled and a search term contains CJK characters (Han, Hiragana, Katakana, or Hangul), the query builder generates `LIKE '%term%'` clauses instead of `to_tsvector @@ to_tsquery` expressions. Case-sensitive `LIKE` is used rather than `ILIKE` since CJK scripts have no letter casing, which also allows potential use of standard B-tree indexes.
2026-02-25 10:18:51 -05:00
Harshil Sharma db3d34c0a0 Optimization 2026-02-25 18:16:25 +05:30
Harshil Sharma 5287a299b6 Fixed type errors 2026-02-25 17:22:43 +05:30
Harshil Sharma 4c8e1d110a Fixed coderabbit issues 2026-02-25 15:26:16 +05:30
Harshil Sharma f11bdd9bdc Merge branch 'master' into redacted_url_message_composition 2026-02-25 12:55:29 +05:30
sabril 7b5c34339d E2E/Test: Migrate flaky MM-T388 to playwright (#35369)
* migrate: MM-T388 to playwright

* remove test.describe
2026-02-25 14:28:21 +08:00
Harshil Sharma 583f32f19b Merge branch 'master' into redacted_url_message_composition 2026-02-25 09:54:51 +05:30
Harrison Healey b831c18f67 Increase minimum version of Node to 24 and NPM to 11 (#35413)
* Increase minimum version of NPM to 11

When we updated the Node.js version, I asked Saturn to make the Node/NPM
version checks looser because I didn't know about anything that would cause
the package-lock.json or package.json formats to change. It seems like NPM 10
is causing a few fields to be removed now, so we should require 11 to avoid
thrashing on that.

* And update the Node version
2026-02-25 11:58:04 +08:00
sabril 4b8ff4e6a3 fix: flaky MM-T5521-8 (#35385) 2026-02-24 11:36:00 +08:00
Elias Nahum 8fd7aea63c update intune doc link (#35166) 2026-02-23 17:57:33 -04:00
Weblate (bot) ec0ad9d1b1 Translations update from Mattermost Weblate (#35404)
* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

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

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2967 of 2967 strings)

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

* Translated using Weblate (English (Australia))

Currently translated at 95.3% (6714 of 7039 strings)

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

* Translated using Weblate (German)

Currently translated at 99.6% (2958 of 2967 strings)

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

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2967 of 2967 strings)

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

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2967 of 2967 strings)

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

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2967 of 2967 strings)

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

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2967 of 2967 strings)

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

* Translated using Weblate (Polish)

Currently translated at 100.0% (2967 of 2967 strings)

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

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (7039 of 7039 strings)

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

* Translated using Weblate (Polish)

Currently translated at 94.8% (6676 of 7039 strings)

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

* Translated using Weblate (German)

Currently translated at 100.0% (2967 of 2967 strings)

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

* Translated using Weblate (German)

Currently translated at 97.3% (6849 of 7039 strings)

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

* Translated using Weblate (Polish)

Currently translated at 95.1% (6696 of 7039 strings)

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

* Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 98.5% (6935 of 7039 strings)

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

* Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (2967 of 2967 strings)

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

* Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (7039 of 7039 strings)

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

* Translated using Weblate (Polish)

Currently translated at 95.3% (6710 of 7039 strings)

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

* Translated using Weblate (Dutch)

Currently translated at 99.9% (2966 of 2967 strings)

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

* Translated using Weblate (Dutch)

Currently translated at 98.7% (6954 of 7039 strings)

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

* Translated using Weblate (Dutch)

Currently translated at 99.7% (7021 of 7039 strings)

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

* Translated using Weblate (Dutch)

Currently translated at 100.0% (7039 of 7039 strings)

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

* Translated using Weblate (Polish)

Currently translated at 95.4% (6720 of 7039 strings)

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

---------

Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Roy Orbitson <roy-orbitson@devo.net.au>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: ThrRip <coding@thrrip.space>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
2026-02-23 13:24:09 +00:00
Harshil Sharma 8a0276c7ec lint fixes 2026-02-23 13:28:16 +05:30
Harshil Sharma 044ef59c42 lint fixes 2026-02-23 13:20:20 +05:30
Harshil Sharma 9b13b3e38a renamed setting 2026-02-23 13:16:00 +05:30
Harshil Sharma 28fd15c591 CI 2026-02-23 12:22:03 +05:30
Harshil Sharma 94796fd8f3 fixed test 2026-02-23 10:34:31 +05:30
Harshil Sharma 8d511d77a8 Handled null column for scheduled post type in database (#35193)
* Handled null column for scheduled post type in database

* [skip ci]

* CI

* CI

* Minor improvement

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-02-23 08:45:07 +05:30
Harshil Sharma 086508519b i18n fixes 2026-02-23 06:50:36 +05:30
Harshil Sharma d32963fd89 LInt fixes 2026-02-23 06:44:06 +05:30
Harshil Sharma c7950b82c9 Merge branch 'master' into redacted_url_message_composition 2026-02-23 06:17:30 +05:30
Harshil Sharma b96f7c1a8d Content flagging actions implementation tests (#35035)
* Added tests for TestGetFlaggingConfiguration

* added tests for RemoveFlaggedPost

* added tests for KeepFlaggedPost

* Added tests for scrubPost and keep flagged post APp layer functions

* Added tests for DeleteAllForPost

* added tests for DeleteAllPostRemindersForPost

* Added tests for DataSpillageFooter

* Added tests for KeepRemoveFlaggedMessageConfirmationModal

* Added tests for KeepRemoveFlaggedMessageConfirmationModal

* Fixed lint errors

* lint fix

* Fixed query param

* fixed tests

* Used middleware to check for content flagging basic checks

* Added TestRequireContentFlaggingEnabled

* Updated tests

* refactoring to reduce code duplication

* review fixes

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-02-23 06:15:40 +05:30
Harrison Healey 033867a344 MM-67522 Add tests for syncing user statuses (#35269)
* MM-67522 Add tests for syncing user statuses

* Clean up newly added tests

* Fix style

* Use SyncResponse.StatusErrors when statuses fail to sync
2026-02-20 16:21:05 -05:00
Ben Cooke 334c1bcbb7 update default worker count for autotranslations (#35355) 2026-02-20 15:09:47 -05:00
Ben Cooke 100cde3a1a [MM-67587] Exclude system messages from autotranslation queue (#35267) 2026-02-20 15:09:23 -05:00
Harrison Healey 392253a168 MM-67539 Fix 'Last login' column in System Console Users table never being populated (#35239) 2026-02-20 15:01:12 -05:00
Ben Cooke e80dec2260 GetAllForObject, use Master instead of replica (#35356) 2026-02-20 14:47:55 -05:00
Harshil Sharma e99cc69618 fixed channel seelection double selection bug 2026-02-20 14:41:43 +05:30
Harshil Sharma 077ecc75a4 WIP 2026-02-20 13:00:03 +05:30
Harshil Sharma f73500f006 Added system console setting 2026-02-20 11:19:25 +05:30
Pablo Vélez 7590aff7ab MM-64490 - Add ABAC system console E2E tests (#35066)
* MM-64490 - Add ABAC system console E2E tests

* split abac e2e tests in logical folders

* Export ABAC helpers from playwright-lib main package

* fix linter issues

* fix prettier

* fix linter

* revert unwanted changes to packa-lock

* Fix ABAC test to use refactored SystemConsoleSidebar API

* fix two failing tests

* fix prettier

* clean up before running the test to make them more reliable

* make create policy less flaky by adding better wait time

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-02-19 23:54:42 -05:00
Scott Bishel 8309cb6a07 Fix: Channels header disappears in Find Channels dialog during search (#35202)
The "Channels" header was flashing and then disappearing when typing in
the Find Channels dialog (Ctrl/Cmd+K). This was caused by the
fetchUsersAndChannels method returning results without the groups
structure that was introduced in MM-62990.
2026-02-19 08:41:41 -07:00
David Krauser c45ba96139 [MM-67565] Prevent setting protected=true on fields without source_plugin_id (#35265)
Add validation to block updates that would create orphaned protected fields (protected=true but no source_plugin_id), which cannot be modified by anyone.

Includes test coverage for single and bulk update paths.
2026-02-19 10:39:33 -05:00
sabril 4e81e504c4 Fix E2E-only PRs and duplicate E2E test runs after PR merges (#35368)
* use master or release base branch correctly for e2e-test-change only

* prevent duplicate run for PR already merged to master or release branch
2026-02-19 23:24:54 +08:00