Commit Graph
3157 Commits
Author SHA1 Message Date
Jesse HallamandNuno Simões cc7acaf2f7 [release-11.8] Backport CI buildenv + cache-warming changes (#37448)
* ci: standardize checkout action inputs across workflows (#36876)

* ci: standardize checkout action inputs across workflows

* ci: checkout in claude pipeline use default

* ci: make setup-go-work a Makefile prereq, remove explicit CI steps (#37268)

* ci: auto-build missing buildenv images for in-flight Go version bumps (#37286)

* ci: replace volatile e2e-platform-pkgs cache with shared webapp-setup (#37182)

* ci: replace volatile e2e-platform-pkgs cache with shared webapp-setup

* ci: replace volatile e2e-platform-pkgs cache in cypress template v2

* ci: tighten prep-deps comments

* fix: typo in webapp-setup comment

* chore(ci): warm node and npm caches daily; make CI jobs restore read-only (#37393)

* chore(ci): warm node and npm caches daily; make CI jobs restore read-only

Add daily scheduled workflows on master that warm two independent caches,
each in its own workflow mirroring its consumers:

- webapp-ci-cache-warm.yml warms the webapp node_modules cache
  (keyed on webapp/package-lock.json)
- e2e-ci-cache-warm.yml warms the E2E ~/.npm registry cache
  (keyed on the cypress/playwright/api lockfiles)

Webapp CI and the E2E/api CI jobs now restore these caches read-only instead
of writing them, so the daily jobs keep the caches warm. The E2E ~/.npm
restore is factored into a reusable restore-e2e-npm-cache composite action,
and webapp-setup gains a read-only mode for the node_modules cache.

* chore(ci): guard cache-warm workflows with a concurrency group

* chore(ci): drop unused node-cache-dependency-path output

* chore(ci): reuse webapp-setup for node_modules in e2e-tests-check

* Move e2e npm registry cache out of the node-cache- namespace (#37427)

The e2e npm registry cache keyed on node-cache-<os>-<arch>-npm-e2e-,
sharing the node-cache- prefix that actions/setup-node generates
automatically for its built-in npm cache (node-cache-<os>-<arch>-npm-).
Because the arch segment differs only by case (setup-node uses Node's
process.arch 'x64'; this action uses runner.arch 'X64') and GitHub matches
restore-key prefixes case-insensitively, the two buckets share a common
prefix. A future broad restore-key such as node-cache-<os>-<arch>-npm-
could then cross-restore one bucket's ~/.npm into the other.

Rename the key to e2e-npm-registry-<os>-<arch>-, giving it a distinct
namespace that is not a prefix of node-cache- in either direction and
matches the repo's content-descriptive e2e cache keys (e2e-cypress-deps-,
e2e-playwright-deps-, e2e-platform-pkgs-). Existing entries orphan and
age out; the daily warm job repopulates under the new key on next run.

* Adopt per-target .PHONY directives in server Makefiles (#37447)

* Converge generated-file CI checks on a single make generated target

The server-ci.yml workflow had many separate "run a make target, then fail
on any git diff" jobs, but make generated only covered a few of them, so the
target and CI drifted apart.

Expand make generated to regenerate every committed asset, adding
gen-serialized, migrations-extract, build-templates, mmctl-docs, and
modules-tidy, and collapse the per-asset check jobs into a single
check-generated job.

Split the backport migration guard into its own check-backport-migrations
job and make target, renaming the script to match.

* make generated

* git status --porcelain

* simplify permissions block given defaults

---------

Co-authored-by: Nuno Simões <nuno.simoes@mattermost.com>
2026-07-15 22:25:21 +03:00
Pablo Vélez 86a295a9fb Enforce team-scope channel check on access policy unassign for parity with assign (#37513)
Automatic Merge
2026-07-15 16:20:46 +03:00
Amy Blais 914908f1d5 Revert "[MM-69394] fix for data retention teams endpoint (#37370) (#37470)" (#37486)
Automatic Merge
2026-07-14 08:50:50 +03:00
mattermost-codeandChristopher Poile 6266958ceb [MM-69394] fix for data retention teams endpoint (#37370) (#37470)
Co-authored-by: Christopher Poile <cpoile@gmail.com>
2026-07-13 14:14:14 -04:00
unified-ci-app[bot] 5972dfd62e Update latest patch version to 11.8.4 (#37363)
Automatic Merge
2026-07-06 17:05:18 +02:00
mattermost-code c14d021484 Tighten validation on channel member role updates (#37075) (#37248)
Automatic Merge
2026-06-26 10:35:30 +02:00
unified-ci-app[bot] efc761a6b9 Update latest patch version to 11.8.3 (#37219)
Automatic Merge
2026-06-25 09:35:17 +02:00
Alejandro García Montoro f4e6ebaf05 MM-69311: Add a new ClusterReliableFallbackLength metric (#37122) (#37177)
* Add a new ClusterReliableFallbackLength metric

This metric tracks the length of the cluster messages that are meant to
be sent via UDP but that result in a UDP datagram larger than the
maximum length allowed.

* make mocks

* Use 8 exponential buckets: from 32KiB to 4MiB
2026-06-23 19:57:38 +02:00
2966a87163 Automated cherry pick of #36999 (#37160)
The GET /api/v4/limits/server endpoint ran expensive active-user and
single-channel-guest count queries for every user on login and app
refresh, even though non-admins never receive those counts. The
single-channel-guest count is a full ChannelMembers scan, so this put a
full-table-scan query on a high-frequency hot path.

Add an includeUserCounts parameter to App.GetServerLimits so the user
and guest count queries only run when the caller needs them. The api4
handler passes the existing admin check, keeping the cheap
license-derived and post-history fields for all users while skipping the
expensive queries for non-admins. Internal callers that genuinely need
the counts (isAtUserLimit, user creation/activation) pass true.


(cherry picked from commit 08c3f6faa9)

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 10:35:43 +00:00
Nick Misasi 197ac76589 Prepackage mattermost-plugin-agents v2.0.5 (#37117)
Automatic Merge
2026-06-22 08:35:18 +02:00
af3bb4d96f Allow syncing any User Attribute field with LDAP/SAML and disable the editable toggle when synced (#37018) (#37127)
* Allow syncing any CPA field with LDAP/SAML and disable editable toggle when synced

A custom profile attribute field could only be linked to LDAP/SAML sync
when it was user-editable, and the editable toggle stayed enabled for
synced fields. Toggling editable off silently stripped the link on save.

Allow admin-managed fields to be synced (sync and admin-managed are no
longer mutually exclusive on the server) and disable the editable toggle
in the dot menu while a field is synced, since synced values come from
the IdP and are never user-editable.



* Add tests for syncable admin-managed CPA fields and disabled editable toggle



* Strengthen sync test coverage: combined admin-managed+synced and SAML update path



* ci: re-trigger Enterprise CI after transient npm network failure



* Address PR feedback: 1 answered, 1 resolved, 0 declined

---------

Co-authored-by: cursor[bot] <206951365+cursor[bot]@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: mattermost-code <matty-code@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2026-06-19 17:38:02 +00:00
Mattermost Build 567fb476ee [MM-69126] Fix custom emoji upload size and GIF frame limits (#36984) (#37069)
Automatic Merge
2026-06-16 13:05:13 +02:00
unified-ci-app[bot] 227b4cea55 Update latest patch version to 11.8.2 (#37062)
Automatic Merge
2026-06-15 19:35:13 +02:00
Mattermost Build 358e15f91c Fix S3 MoveFile/CopyFile failing on files larger than 5GiB (#37035) (#37058)
Automatic Merge
2026-06-15 15:35:20 +02:00
Julien Tant 91838fa971 Bound document content extraction time and decouple it from uploads (MM-69098) (#36856) (#37040)
Automatic Merge
2026-06-15 08:35:12 +02:00
Harshil Sharma 7480cc65b4 Added pre-migration infra and a pre-migration for fixing schema ID migration numbers (#36870) (#37009)
Automatic Merge
2026-06-11 14:29:45 +02:00
Mattermost Build 8ade748ac8 MM-68830: Preserve unknown permissions during migrations on downgrade (#36888) (#37005)
Automatic Merge
2026-06-11 08:29:44 +02:00
Mattermost Build 66b3c1f84a [MM-68618] Harden file removals (#36427) (#36998)
Automatic Merge
2026-06-10 10:59:45 +02:00
unified-ci-app[bot] e11e790749 Update latest patch version to 11.8.1 (#36977)
Automatic Merge
2026-06-10 08:00:04 +02:00
Nick MisasiandCursor c7e19829a1 Prepackage mattermost-plugin-playbooks v2.9.1 (#36924)
Bump the default prepackaged Playbooks plugin from 2.9.0 to 2.9.1 (non-FIPS).
FIPS prepackaged plugin package list is unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 15:45:12 +00:00
Nick Misasi 7411ceba05 Prepackage mattermost-plugin-agents v2.0.4 (#36920)
Automatic Merge
2026-06-04 17:24:10 +02:00
Mattermost BuildandDevin Binnie 829ed17249 [MM-69115] Fixed issue where channels could end up in two categories (#36875) (#36905)
* [MM-69115] Fixed issue where channels could end up in two categories

* Additional fix

* PR feedback

(cherry picked from commit 3fc5b94292)

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
2026-06-04 13:59:43 +00:00
Maria A NunezandCursor 8df4296455 Harden post action request verification (#36840) (#36906)
Manual cherry-pick of mattermost/mattermost#36840 onto release-11.8.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 13:59:35 +00:00
Nick Misasi 9b4cac66a0 Revert MM-67913 from release-11.8 (#36898)
Automatic Merge
2026-06-04 14:54:10 +02:00
Mattermost Build ea0ffa1714 Restrict group_constrained to channels that support group sync (#36812) (#36886)
Automatic Merge
2026-06-04 10:54:05 +02:00
Mattermost Build 0c1e150c31 MM-69010: Validate incoming webhook user membership (#36811) (#36885)
Automatic Merge
2026-06-04 10:24:06 +02:00
Mattermost Build c54329b5ff MM-69057: Verify post ownership on inbound shared-channel edit/delete (#36814) (#36884)
Automatic Merge
2026-06-04 09:54:05 +02:00
6ce233bce4 MM-68952: Resolve public channel mentions for non-members under Compliance (#36815) (#36883)
* MM-68952: Resolve public channel mentions for non-members under Compliance

Channel mention name resolution reused HasPermissionToReadChannel, a
content-read check that returns false for non-members of a public channel
when Compliance Monitoring is enabled (MM-45272) or when the channel is on
another team (MM-66791). As a result, the channel_mentions post prop was
stripped per-viewer (since #34235), and the webapp fell back to rendering the
raw (anonymized) channel slug instead of a clickable link.

Introduce HasPermissionToResolveChannelMention, which exposes only a public
channel display name and link (not content) and is therefore independent of
ComplianceSettings, while still requiring team membership for public channels
(blocks cross-team disclosure) and channel membership for private/DM/GM
channels. Switch the three mention call sites (FillInPostProps,
sanitizeChannelMentionsForUser, channelMentionsBroadcastHook) to the new
helper. HasPermissionToReadChannel and all content-read paths are unchanged.



* MM-68952: Add author-side and E2E coverage for channel mention resolution

Add a Go test (TestFillInPostPropsChannelMentionResolution) that exercises the
author-side persistence of the channel_mentions prop in FillInPostProps. It
locks in the new behavior: an author who is a team member but not a member of a
referenced public channel now persists the mention prop even when Compliance
Monitoring is enabled, while public channels on other teams and private
channels the author is not in are still dropped.

Add a Playwright spec (channel_mention_resolution.spec.ts) with a license-free
cross-team case (a public channel mention stays unresolved for a viewer not on
the channel's team) and a license-gated case (with Compliance enabled, a team
member who is not in the channel sees the resolved mention link).



* MM-68952: Tighten channel mention test assertions and fix lint

Use strings.Builder when assembling the test message to avoid the
golangci-lint stringsbuilder (modernize) warning about string += string
in a loop. Tighten the cross-team public and private non-member cases to
assert.Nil on the resolved mentions so the contract requires no persisted
channel_mentions map rather than merely an empty one.



---------


(cherry picked from commit 61643e1066)

Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 07:04:58 +00:00
deb266789b MM-68995: reject deactivated guests on REST magic-link login (#36746) (#36842)
Apply CheckUserAllAuthenticationCriteria after guest magic-link token
authentication in POST /api/v4/users/login, matching the web one-time-link
handler and password login paths.

Add regression test ensuring deactivated guests receive 401 inactive while
active guests can still log in via magic_link_token.



(cherry picked from commit 5c360d8077)

Co-authored-by: Julien Tant <785518+JulienTant@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Julien Tant <JulienTant@users.noreply.github.com>
2026-06-02 07:52:07 +00:00
Mattermost Build 1927fdbdae MM-69053 Log server message when a user has concurrent React enabled (#36837) (#36843)
Automatic Merge
2026-06-02 08:54:06 +02:00
Mattermost Build cad958b3d5 MM-68983: Tighten OAuth token issuance and cleanup on user deactivation (#36743) (#36833)
Automatic Merge
2026-06-01 21:24:07 +02:00
Mattermost Build e392494b98 Automated cherry pick of #36773 (#36807)
Automatic Merge
2026-05-29 17:54:07 +02:00
Mattermost Build 5b3218f91b MM-68978 - Harden ABAC masking guards and fix sentinel detection (#36740) (#36804)
Automatic Merge
2026-05-29 14:54:07 +02:00
Mattermost Build fa1fc27104 MM-68845: Tighten authorization on /share-channel autocomplete (#36662) (#36793)
Automatic Merge
2026-05-29 09:24:18 +02:00
Mattermost Build d87364d0a5 MM-68840: Apply team sanitization on scheme teams endpoint (#36640) (#36788)
Automatic Merge
2026-05-29 08:54:05 +02:00
Mattermost BuildandDavid Krauser 2a7ca9f769 [MM-69028] Enable ClassificationMarkings feature flag by default (#36776) (#36779)
(cherry picked from commit 800810e880)

Co-authored-by: David Krauser <david@krauser.org>
2026-05-28 15:27:11 +00:00
9a6449b998 Return error when plugins use deprecated custom_profile_attributes group name (#36748) (#36768)
The plugin API was silently redirecting calls using the old
"custom_profile_attributes" group name to the new "access_control" group.
Replace the silent alias with an explicit error so plugin developers get
a clear message telling them what to change.


(cherry picked from commit 159ed5ad96)

Co-authored-by: David Krauser <david@krauser.org>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 17:41:15 -04:00
Mattermost Build f2c7ddc199 Fixed a bug where deleted post was broadcasted by the server and rest… (#36646) (#36762)
Automatic Merge
2026-05-27 18:24:07 +02:00
Mattermost Build 71b304f3ff Data spillage report api use available data (#36699) (#36755)
Automatic Merge
2026-05-27 09:54:05 +02:00
Devin Binnie 37562cfdac Cherry-pick of #36511 to release-11.8 (#36742) 2026-05-26 16:11:14 +00:00
David Krauser 0d2fa8e267 [MM-68777] Add admin property field permission level (#36558) (#36713)
Automatic Merge
2026-05-25 10:54:05 +02:00
Mattermost BuildandIbrahim Serdar Acikgoz 61e6283f3a Automated cherry pick of #36472 (#36677)
* [MM-68693] Resource level permission policies and new simulation (#36472)

(cherry picked from commit ba1cec51a5)

---------

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2026-05-22 15:27:51 +02:00
Mattermost Build 54ce67062a Bumping version of prepackaged boards plugin (#36701) (#36704)
Automatic Merge
2026-05-22 11:23:38 +02:00
Mattermost Build ddcb2cec9c MM-68763: Discoverable Private Channels — Server feature complete (visibility, ABAC, queue API) (#36580) (#36679)
Automatic Merge
2026-05-22 08:23:37 +02:00
Mattermost Build 8172579910 MM-68838: Ping a restored plugin remote immediately on re-register (#36592) (#36644)
Automatic Merge
2026-05-21 08:53:38 +02:00
Mattermost Build 68e99a44e6 MM-68151: Update server dependencies (#36571) (#36664) 2026-05-20 22:40:54 -03:00
Jesse Hallam 608dddf286 Upgrade Go to 1.26.3 (#36656) (#36657) 2026-05-20 14:31:31 -03:00
Jesse HallamandMattermost Build d7626dfd46 Fix config Sanitize fields missing from desanitize, causing FakeSetting to be persisted (#36619) (#36649)
* Add TestDesanitizeRemovesAllFakeSettings to catch future omissions

Walks every string field in the config after a Sanitize+desanitize
round-trip and fails if any still holds FakeSetting. This catches the
case where a field is added to Sanitize without a corresponding
desanitize entry.

* Fix ElasticsearchSettings.ClientKey being incorrectly masked as a secret

ClientKey is a file path, not a secret value. Masking it caused the
asterisk string to be persisted to the database on config writes, which
broke TLS client auth on restart.

* Fix desanitize missing entries for fields added in 504fb96fdd

504fb96fdd masked five fields in Sanitize without adding the
corresponding desanitize entries, meaning a config save through the
API would permanently overwrite those fields with FakeSetting:

- FileSettings.ExportAmazonS3SecretAccessKey
- ServiceSettings.GoogleDeveloperKey
- ServiceSettings.GiphySdkKey
- CacheSettings.RedisPassword
- AutoTranslationSettings.LibreTranslate.APIKey

* fixup! Add TestDesanitizeRemovesAllFakeSettings to catch future omissions

* fixup! Fix desanitize missing entries for fields added in 504fb96fdd

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-05-20 16:07:10 +00:00
Mattermost Build 575897518f Mm 68506 fe abac mask fe table editor cel and e2e (#36517) (#36635)
Automatic Merge
2026-05-20 07:53:44 +02:00
Mattermost Build fb50e5ff84 MM-68702: Reject demoting bot accounts to guest (#36487) (#36621)
Automatic Merge
2026-05-19 08:23:40 +02:00