Commit Graph
5518 Commits
Author SHA1 Message Date
a9e574a826 MM-68547: Tighten authorization on group syncable link and patch endpoints (#36316) (#36423)
* MM-68547: Tighten authorization on group syncable link and patch endpoints

Adds an additional permission check on the group syncable link and patch
endpoints. Callers must hold the role-management permission for the
target team or channel (or the sysconsole groups-management permission).

Made-with: Cursor

* Linting

* MM-68547: Extend group syncable scheme_admin authorization checks

Gate any explicit scheme_admin value (in either direction) on link and
patch. Populate SchemeAdmin in the singular getGroupSyncable so that
patches that do not touch scheme_admin no longer overwrite the persisted
value. Restrict PermittedSyncableAdmins to active syncables. Start the
link upsert from the existing active row to preserve fields the caller
did not, or could not, set.

Made-with: Cursor

* MM-68547: Add store-layer regression coverage for SchemeAdmin handling

Extend testGetGroupSyncable to round-trip SchemeAdmin: true through
UpdateGroupSyncable and re-fetch, locking in that getGroupSyncable
populates the field from the persisted row.

Strengthen groupTestPermittedSyncableAdmins{Team,Channel} to assert
that DeleteGroupSyncable preserves SchemeAdmin in the persisted row
and that PermittedSyncableAdmins still excludes the row, making the
coupling between the two store changes explicit.

Made-with: Cursor

* MM-68547: Fix group details role-change dedup on remove

The roleChangeKey helper was reading team_id/channel_id from the items
in itemsToRemove, but onRemoveTeamOrChannel pushes those items with a
generic id field. The deletion of the staged role change in
handleRemovedTeamsAndChannels therefore never matched the key produced
by onChangeRoles, and a stale patchGroupSyncable was dispatched after
the unlink.

Accept either id or team_id/channel_id when computing the key. Also
extend the e2e assertion to verify the channel removal took effect
(delete_at != 0) alongside the existing scheme_admin check.

Made-with: Cursor

* MM-68547: Mirror delete_at assertion on the removed-team e2e test

The team variant of "does not update the role of a removed X" was left
asserting only on scheme_admin. Add the matching delete_at != 0 check
already present in the channel variant so both tests verify the same
user-visible contract.

Made-with: Cursor

* Skip SyncSyncableRoles if no scheme_admin

(cherry picked from commit 8c72083414)

Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
2026-05-05 14:13:45 -04:00
Devin BinnieGitHubcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
d0c2842145 [MM-68608] Feature flag Managed Categories (#36345)
* [MM-68608] Feature flag Managed Categories

* Update server/channels/api4/channel_test.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Fix i18n

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-04-30 16:45:59 +00:00
Ibrahim Serdar AcikgozandGitHub f21e30c8d0 [MM-68535] Invalidate channel cache after policy assignment (#36292) (#36323)
Automatic Merge
2026-04-29 12:17:40 +02:00
Mattermost BuildandGitHub a4c35451b8 Mm 68353 show placeholder for redacted files in preview (#36153) (#36280)
Automatic Merge
2026-04-27 13:47:38 +02:00
Mattermost BuildandGitHub 91f9afc944 Reorder channel banner (#36268) (#36269)
Automatic Merge
2026-04-27 08:17:39 +02:00
09fb137060 Fix Managed Category creatable input color on dark themes (#36242) (#36244)
The react-select input uses classNamePrefix ManagedCategory, so it did not
inherit the global react-select__input theme color. Set color to
var(--center-channel-color) on the input and input-container to match
placeholder and single-value styling.



(cherry picked from commit 9d33d87e0a)

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Devin Binnie <devinbinnie@users.noreply.github.com>
2026-04-23 17:34:57 +00:00
Mattermost BuildandGitHub 610fdc9e1b [MM-68162] Allow only "in" operator for multiselect type attributes in basic editor (#35896) (#36229)
Automatic Merge
2026-04-23 13:17:39 +02:00
Mattermost BuildandGitHub e69013dafc MM-68259 Fixing text and emojis being clipped in channel banners (#36076) (#36193)
Automatic Merge
2026-04-21 10:42:11 +02:00
dca6ce2995 [MM-68103] Add channel banner to thread view (#35942) (#36156)
(cherry picked from commit 846e45a114)

Co-authored-by: David Krauser <david@krauser.org>
2026-04-16 15:44:22 -04:00
b57f5c3d47 MM-68274 - Adding watermarking toggle in server (#36025) (#36141)
* Adding watermarking toggle in server

* Update setting to enterprise

* Adding it to mobile security

* Updating experimental section

* Moved back to experimental settings. Added license checks

* Updating tests

---------


(cherry picked from commit d2848a893a)

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
Co-authored-by: maria.nunez <maria.nunez@mattermost.com>
2026-04-16 17:52:30 +05:00
7bd18f5dec fix(editor): restore focus to main textbox after editing a post (#35518)
After editing a post, the main textbox now properly regains focus.
The fix uses the stored refocusId to focus the correct textbox element
(post_textbox or reply_textbox) before unsetting edit mode.

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-04-16 09:28:34 +05:30
beb96185cd [MM-68183] Permission policies (#36003)
---------

Co-authored-by: Pablo Vélez <pablovv2012@gmail.com>
2026-04-16 04:02:12 +03:00
80b977807a Feature mm 64509 team admin abac channels (#36061)
* MM-67592 - be changes for team admin abac channels (#35353)

* MM-67592 - be changes for team admin abac channels

* Revert team-scoped API routes, keep app layer business logic

* move from config to permission; Add cluster-aware LRU cache for policy team scope lookup

* remove unnecessary references to config value

* local/remote cache invalidation consistency for policy scope

* Replace policy scope cache with store-level team scope query

* rename functions and add comments to query

---------

Co-authored-by: Mattermost Build <build@mattermost.com>

* MM 67594 - policies CUD operations to team settings modal channels ABAC (#35590)

* MM-67592 - be changes for team admin abac channels

* Revert team-scoped API routes, keep app layer business logic

* move from config to permission; Add cluster-aware LRU cache for policy team scope lookup

* remove unnecessary references to config value

* local/remote cache invalidation consistency for policy scope

* Replace policy scope cache with store-level team scope query

* format files correctly

* fix mock expectations for store-query approach in tests

* rename functions and add comments to query

* revert error ids to original to prevent break tests

* adjust translations

* MM-67669 - add tab to team settings modal and basic listing

* adjust tests and fix linter

* use existing search api logic

* fix style and adjust flaky test to clean up and restore orinals

* address ai corabbit feedback and fix linter

* fix unit tests

* MM-67592 - be changes for team admin abac channels (#35353)

* MM-67592 - be changes for team admin abac channels

* fix linter

* fix ts linter for playwright

* Revert team-scoped API routes, keep app layer business logic

* move from config to permission; Add cluster-aware LRU cache for policy team scope lookup

* remove unnecessary references to config value

* local/remote cache invalidation consistency for policy scope

* Replace policy scope cache with store-level team scope query

* format files correctly

* fix mock expectations for store-query approach in tests

* rename functions and add comments to query

* revert error ids to original to prevent break tests

* adjust translations

---------

Co-authored-by: Mattermost Build <build@mattermost.com>

* MM-67594 - support cud operations for team abac BE changes

* create the team settings policy edit section, reuse most components, add basic e2e

* move optional refresh policy list button to list component

* temp get team admins cud policies and sync job

* enhance validation and adjust e2e

* Fix testExpression permission; fix pagination of team policies; add isValidId validation

* adjust styles, handling renaming and add permission migrations

* update the permissions names, use the simple confirmation modal, define the delete modal

* fix policy deletion flow

* fix some linter issues and adjust helper tests

* remove delete from list and fix e2e

* code comments clean up

* remove CEL editor for now, clean styles, enhance e2e

* fix linter, adjust unit test

* fix linter and add missing translation

* fix policy deletion ownership and sanitize test expression

* fixed e2e tests

* rollback orphaned policy on failed channel assignment

* enforce channelless check before last_team_id fallback

* enforce channelless guard on assign fallback too

* add translations missing

* add teamId to audit payload when present

* fix refresh button pagination reset

* fix null safety in channel selector loadChannels

* use responsive width cap for team settings modal and adjust header size

* remove redundant raw term from channel search URL, add showRefreshButton prop to PolicyList component

* handle error when stamping last team ID on channelless policy

* replace Props-based ownership with in-memory LRU cache, disable save on zero channels

* make e2e tests more reliable in CI

* test skip if no license valid found

* add childCount guard to cache-hit paths and reduce TTL to 5s

* fix e2e, adjust translation

* address review feedback: flatten permission checks and separate error types

- Flatten nested permission branching in deleteAccessControlPolicy using
  early returns to reduce indentation (review: isacikgoz)
- Validate teamID as input (400) before using it for permission checks (403)
  in testExpression and validateExpressionAgainstRequester handlers
- Remove redundant hasSystemPermission check in searchAccessControlPolicies
  since system_admin role already includes manage_team_access_rules
- Refactor ValidateTeamAdminPolicyOwnership to return (bool, *model.AppError)
  separating "not owned" from "internal error" across all 8 call sites
- Update tests to assert on both return values

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* add persistent team scope to access control policies, replace in-memory cache

* fix translation

* fix case-insensitive policy search and sanitize search term input

* make policies tests have a unique name

* decouple scope/scopeID filter from TeamID in policy store

* Fix authZ bypass searchChannelsForAccessControlPolicy by forcing TeamIds to authorized team

* show unsaved changes on navigator back, and list all private channels on load

* filter already applied channels to a policy

* adjust the styles to dark mode; do not show added channels to the policy in the add channels modal

* fix linter

* MM-67967 add sync status footer to team settings (#35729)

* MM-67967 add sync status footer to team settings

* remove magic numbers and strings and polish the code

* fix linter

* fix linter: replace interface{} with any per gofmt rewrite rule

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refine getJobsByType team-scoped filtering and permissions

* fix sync footer stuck in syncing state on job creation error

* fix team-scoped job pagination in getJobsByType

* Fix authZ bypass searchChannelsForAccessControlPolicy by forcing TeamIds to authorized team

* implement ux feedback, change titles font, fix marging and scroll view jump

* MM-68135 - migrate add channels to policy modal to generic modal (#35907)

* MM-67920 unify e2e team settings tests (#35867)

* MM-67920 - extract duplicated policy editor helpers

* remove duplicate team icon test file

* rename Access Control to Membership Policies in e2e

* replace networkidle with explicit element waits

* fix attribute loading issue

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix playwright feedback issues and persist filters to the store layer in the no systemconsole path

* Improve policy scope validation and team admin security checks

* Renamed public channels to "AAA Public Channel %03d" and private ones to "ZZZ Private..." so the 55 public channels now fill the 50-result cap

* fix e2e tests and add new unit tests to improve coverage

* Improve e2e test stability: race condition handling and timeout adjustments

* Improve team-scoped ABAC policies: scope preservation, input validation, shared exclusion

* Add comprehensive ABAC test coverage: team admin ops and security validation to reduce flakyness

* Fix team policy editor back button: preserve navigation intent through Undo

* style: format import statements for better readability

* Enhance access control policy creation for team admins: enforce scope stamping from query parameters to prevent unauthorized team assignments

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 00:48:43 +02:00
Nick MisasiandGitHub 455815a067 Update permission_system_scheme_settings snapshots (#36121)
Snapshots were stale after manage_own_agent and manage_others_agent
permissions were added in d4d65c8cfb without a snapshot update.

Made-with: Cursor
2026-04-15 15:19:59 -04:00
d4d65c8cfb Add manage_own_agent and manage_others_agent permissions (#35924)
* Add PermissionCreateAgent server-side permission definition

Define PermissionCreateAgent in the model layer with system scope,
add to SystemScopedPermissionsMinusSysconsole (feeds AllPermissions),
grant to system_user in MakeDefaultRoles(), and register a permissions
migration for existing installations (system_admin + system_user).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add exhaustive tests for PermissionCreateAgent permission

Model tests: verify create_agent is in AllPermissions, has system scope,
correct i18n fields, present in system_admin and system_user default roles,
and absent from system_guest.

Migration test: verify getAddCreateAgentPermissionMigration adds create_agent
to both system_admin and system_user, and is idempotent on re-run.

Also register the migration key in testlib mock store so server initialization
skips it during test setup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add webapp permission constants and i18n for create_agent

Add CREATE_AGENT constant to permissions.ts, display strings with
defineMessages in permissions.tsx, and i18n entries in en.json so the
permission appears in System Console Permission Schemes UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Clean up tests and minor fixups for create_agent permission

Consolidate role_test.go into table-driven tests, remove redundant comments
in permissions_migrations_test.go, add .planning/ to .gitignore, and
refresh webapp/package-lock.json.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Split create_agent into manage_own_agent and manage_others_agent

Replace PermissionCreateAgent with system-scoped own/others permissions,
update migration and defaults, and wire System Scheme UI for integrations.

Made-with: Cursor

* fixes

* Stabilize autotranslation E2E by pinning mock source language

Set LibreTranslate mock to English before the pre-enable post and Spanish
before the post-enable message so parallel tests cannot leave the mock in
a state where the new message is not translated.

Made-with: Cursor

* Revert package-lock, add more chnages

* Revert "Revert package-lock, add more chnages"

This reverts commit 7f6752c2e0.

* Drop unrelated autotranslation E2E tweak; restore package-lock

The Playwright autotranslation change was not caused by MM-65671. Revert
that test edit and restore webapp/package-lock.json after an accidental
revert of the prior package-lock update.

Made-with: Cursor

* Put package-lock back again

* fixes

* Fix migration tests for manage_own_agent on system_user role

Made-with: Cursor

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2026-04-15 14:57:46 +00:00
62d0ab633f [GH-29948] [GH-32467] Avoid fetching resources requiring a license if it isn't the case (#34206)
* [GH-30388] Don't load custom profile attributes if not licensed or disabled

* [GH-29948] Don't load scheduled posts if not enabled

Fixes #29948

* chore: add and use isCustomProfileAttributesEnabled selector

* tests: fix type check error

* review: fix lint, handle props update, add tests and cleanup uneeded code

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-04-15 10:53:59 -04:00
sabrilandGitHub bff3577690 chore(playwright): upgrade to v1.59 and to typescript@6.0 (#36071) 2026-04-15 17:43:52 +08:00
Ibrahim Serdar AcikgozandGitHub c66bb0ecdb [MM-68109] Introduce new policy version v0.3 (#35904) 2026-04-15 11:22:41 +02:00
Harshil SharmaandGitHub b712595dd0 Fixed the UI for compact mode file editing (#35878)
* Fixed the UI for compact mode file editing

* Added test

* Updated file container height and font size for compact mode

* Updated snapshot

* File name truncation fix

* lint fix

* updated snapshot

* Updated snapshot
2026-04-15 10:26:03 +05:30
Christopher SpellerandGitHub 0f2c16754f Add pluggable AI actions menu with custom prompts extension point (#35930)
* Add pluggable AI actions menu with rewrite submenu and plugin extension point

* Use cascading hover popover for AI actions submenus

* Fix lint errors in AI actions menu and related files

* Update i18n strings for AI actions menu

* Fix coding guideline violations in AI actions menu and tests

* Fix spacing

* Fix stylelint errors in use_rewrite.scss

* Support ReactNode for AI action menu item text

* Fix empty menu guard, keyboard a11y, and rewrite follow-up placeholder

* Hide rewrite actions while a rewrite is in progress

* Remove subMenuHeader from plugin API and pass isRHS context to plugin components

* Support simple click actions in AI action menu plugin API

* Fix import order in ai_actions_menu tests

* Flip AI actions submenu to open left when insufficient space on right

Adapts the viewport-aware positioning pattern from the existing SubMenu
component so the cascading submenu renders on the side with more space.

* Only flip submenu to left when right space is insufficient
2026-04-14 18:46:20 +00:00
Nick MisasiandGitHub 5af77b7e08 MM-67095: Hide Workspace Optimization for cloud-licensed workspaces (#36077)
Made-with: Cursor
2026-04-14 10:02:07 -04:00
Devin BinnieGitHubcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>Matthew BirtchHarrison HealeyMattermost Buildcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
01219efbf4 [MM-68037] Managed Sidebar Categories (MVF) (#35935)
* [MM-68037] Managed Sidebar Categories (MVF)

* PR feedback

* PR feedback

* Fix test issue again

* Fixed a few things

* Fix again

* PR feedback

* Update server/i18n/en.json

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update server/i18n/en.json

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update webapp/channels/src/packages/mattermost-redux/src/actions/channel_categories.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* PR feedback

* PR feedback

* More PR feedback

* Test fixes

* This one too

* PR feedback

* more

* More feedback

* More

* more

* Yup

* More

* PR feedback

* Update webapp/channels/src/components/channel_settings_modal/managed_category_selector.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Block setting behind Enterprise license

* Update webapp/channels/src/packages/mattermost-redux/src/selectors/entities/channel_categories.ts

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>

* Update webapp/channels/src/packages/mattermost-redux/src/actions/channel_categories.ts

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>

* PR feedback

* Don't await for the initial managed category check

* Turn into its own action

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
2026-04-14 09:00:59 -04:00
ed80e8ba91 Shared channel UI for channel admins (#35448)
* Shared channel UI for channel admins

* Fix lint

* Use errors.is instead of using string comparison

* Fix configuration check

* Handle error when sharing an already shared channel

* Remove unneeded disabled prop

* Add missing tests

* Frontend tweaks

* Fix lint

* Fix lint and test

* Address coderabbit review

* Fix removing unconfirmed remotes

* Better handle errors while saving state

* Remove unneeded state

* Fix selector not being stable between different renders

* Fix i18n and improve one type

* Update webapp/channels/src/components/channel_settings_modal/share_channel_with_workspaces/share_channel_with_workspaces.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/channel_settings_modal/share_channel_with_workspaces/add_workspace_dropdown.tsx

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/channel_settings_modal/share_channel_with_workspaces/share_channel_with_workspaces.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/channel_settings_modal/share_channel_with_workspaces/workspace_list.tsx

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/channel_settings_modal/share_channel_with_workspaces/share_channel_with_workspaces.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update webapp/channels/src/components/channel_settings_modal/share_channel_with_workspaces/share_channel_with_workspaces.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Apply suggestions from code review

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Deal with settings option permissions

* Add message when no remotes are available

* Add dividers

* Add disabled tooltip

* Fix tests

* Fix lint

* Touch update at on share/unshare

* Fix tests

* Fix lint

* Add missing await

* Add e2e tests

* Fix playwright prettier

* Update server.prepare to have connected workspaces enabled by default

* Revert changes on server.prepare and try with changes on server.generate

* Fix shared channel configuration E2E tests (#35786)

* Update webapp/channels/src/components/channel_settings_modal/share_channel_with_workspaces/share_channel_with_workspaces.scss

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>

* Update initial enabled state to properly handle saves

* Update role name in e2e tests

---------

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: yasser khan <attitude3cena.yf@gmail.com>
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2026-04-14 11:37:09 +02:00
Devin BinnieGitHubcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2fb38fe71d [MM-68266] Pass through menu props to popout menu item, guard at menu definition to avoid null component blocking keyboard navigation (#36024)
* [MM-68266] Pass through menu props to popout menu item, guard at menu definition to avoid null component blocking keyboard navigation

* fix tests

* Update webapp/channels/src/components/sidebar/sidebar_channel/sidebar_channel_menu/sidebar_channel_menu.test.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-04-13 14:36:17 -04:00
Harrison HealeyandGitHub e3b2b0a521 Improve CJK handling in autocompletes and Find Channels modal and using Firefox (#35937)
* MM-66937 Remove existing code for handling composition in SuggestionBox

This breaks the ability to autocomplete on Korean characters that haven't been
committed on Firefox. Both the previous and new versions seem to work fine on
Chrome though.

* Add E2E test for SuggestionBox composition in Find Channels modal

* Fix misnamed field
2026-04-13 13:47:45 -04:00
JG HeithcockandGitHub 28dffaa574 MM-68235: Rename user-visible "Custom Profile Attributes" to "User Attributes" (#36046)
* MM-68235: Rename user-visible "Custom Profile Attributes" to "User Attributes"

Update all English i18n translation values and inline
defaultMessage strings to use the current product name
"User Attributes" instead of the old "Custom Profile
Attributes" / CPA naming.

Add naming-history comments to key CPA source files
(model, app, api4, admin component) explaining that
internal identifiers retain the old naming for backward
compatibility with REST APIs, WebSocket events, and the
Property System Architecture group name. This helps
future developers understand the mapping without needing
to track down the rename history.

* Fix missed lowercase "custom profile attribute" strings
2026-04-13 08:13:58 -07:00
Harrison HealeyandGitHub 8e14c8ed58 MM-67505 Add AnalyticsQueryTimeout setting and use when refreshing materialized views (#35906)
* MM-67505 Add AnalyticsQueryTimeout setting and use when refreshing materialized views

* Fix last minute i18n change

* Disallow 0 values for AnalyticsQueryTimeout

* Fix E2E test config

* Fix post store tests crashing

* Update snapshot and revert accidental changes to it
2026-04-13 09:27:20 -04:00
sabrilandGitHub f2a964faf3 fix(cypress): demo plugin (#36056) 2026-04-13 10:16:49 +00:00
8f45806004 MM-63588: Add e2e tests for System Console User Attributes (#35931)
* MM-63588: Add e2e tests for System Console Custom Profile Attributes

Add Playwright e2e tests for the System Console User Attributes page,
covering CRUD operations for custom profile attribute field definitions.

Tests cover:
- Page navigation and empty state display
- Creating text, select, and multiselect attributes with options
- Editing attribute names
- Deleting attributes (saved and unsaved)
- Duplicating attributes
- Changing attribute types (Text to Phone)
- Configuring visibility (Always show/Hide when empty/Always hide)
- Toggling "Editable by users" setting
- Batch creation (multiple attributes at once)
- Persistence verification after page reload
- Validation warnings (empty name, duplicate names)

Follows the same patterns established in MM-62558 / PR #30722 for
Profile Popup CPA tests, reusing shared helpers for field setup/cleanup.

* Fix 6 failing e2e tests for System Console User Attributes

- Remove .clear() before .fill() to prevent value-based locators from
  going stale (edit name, persist after reload tests)
- Hover on visibility submenu instead of click, use force:true to handle
  DOM detach during menu animation (visibility test)
- Press Escape to close dot menu before clicking Save, since the
  "Editable by users" toggle keeps the menu open (editable test)
- Fix expected validation text: use "Attribute names must be unique."
  instead of "Attribute name already taken." (duplicate names test)
- Increase timeout for Save button disabled assertion after deleting
  unsaved attribute (delete unsaved test)

* Fix stale locators, flaky save check, and document dirty-state bug

- Use data-testid locators instead of value-based selectors for inputs
  that get mutated by fill() (edit name + persist reload tests)
- Wait for Save button to return to disabled after save before API
  check to avoid flaky field-not-found failures
- Add test.fail() for Save-stays-enabled bug after deleting an unsaved
  row so CI passes today and alerts when the app bug is fixed
- Add LOCATOR NOTE to file header explaining the lazy locator pitfall

* Address CodeRabbit review: save helper, locator fix, test rename

- Add saveAndWaitForSettled() helper and apply to all 11 save paths
  for consistent post-save stabilization before API verification
- Fix deptInput locator: use input[value] instead of broken
  filter({hasText}) which doesn't match input element children
- Rename "different types" test to "multiple text attributes" to
  match actual coverage

* MM-63588: add SystemProperties page object and refactor spec to POM

Extract all UI selectors from user_attributes.spec.ts into a
SystemProperties page object class, eliminating inline selectors
from the test file. Replace coarse networkidle with waitForResponse
on the actual save API endpoint.

* fix playwright e2e test failures

- selectType was failing as 'select' caught both 'select' and 'multi-select'
- Prior behavior where Save button wasn't returning to disabled appears to be working now, removing test.fail()

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-04-11 02:42:53 +00:00
Doug LauderandGitHub 73c6e6a7cf MM-68258 Remove system_secure_connection_manager role (#36009)
* Remove system_secure_connection_manager role

  The dedicated role for delegating secure connection management is no
  longer needed. The manage_secure_connections permission remains and
  continues to be granted to system admins via AllPermissions.

  Removes the role definition, migration, permissions migration, UI
  components, i18n strings, and all associated tests across server,
  webapp, and e2e-tests.
2026-04-10 10:49:04 -04:00
Devin BinnieGitHubcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>Mattermost Build
5476f69f71 [MM-68048] Add focus/blur listeners for popouts to determine focused channel/thread (#35990)
* [MM-68048] Add focus/blur listeners for popouts to determine focused channel/thread

* Update webapp/channels/src/utils/popouts/popout_windows.test.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Remove close listener

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2026-04-10 09:11:57 -04:00
c96d215ff1 Translations update from Mattermost Weblate (#35966)
* 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 (Polish)

Currently translated at 96.8% (3011 of 3108 strings)

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

* Translated using Weblate (Polish)

Currently translated at 98.3% (6981 of 7095 strings)

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

---------

Co-authored-by: master7 <marcin.karkosz@rajska.info>
2026-04-10 12:43:58 +02:00
Scott BishelandGitHub f441b34dee Fix interactive dialog bugs: dynamic select lookups, radio values, field refresh (#35640)
* Fix interactive dialog bugs: dynamic select lookups, radio values, and field refresh

- Cache sanitized fields in AppsForm to preserve object identity across
  renders, preventing AsyncSelect from remounting and re-triggering
  dynamic select lookups on every keystroke in any field

- Normalize radio field default values to plain strings in getDefaultValue()
  so the value shape is consistent with what RadioSetting.onChange returns
  (e.target.value). Accept both string and {label, value} object shapes
  downstream for backwards compatibility.

- Fix radio field [object Object] in submission by extracting .value from
  AppSelectOption objects in convertAppFormValuesToDialogSubmission

- Include selected_field in refresh submission so plugins know which field
  triggered the refresh. Use a shallow copy of accumulatedValues to avoid
  permanently contaminating the accumulated state.

- Send empty string for cleared select fields in refresh submissions.
  Previously, extractPrimitiveValues skipped null values and the spread
  merge never overwrote stale accumulated keys.
2026-04-09 07:50:36 -06:00
6878d09547 refactor(brand_image_setting): migrate BrandImageSetting to a function component (#34536)
* refactor(brand_image_setting): migrate to function component

* test(brand_image_setting): update tests

Migrated tests to React Testing Library.

* refactor(brand_image_setting): wrap functions with useCallback

* test(brand_image_setting): use nock to mock fetch api

* test(brand_image_setting): use findby query instead of getby

* test(brand_image_setting): remove unnecessary scope assertion

* chore(brand_image_setting): split useEffect into two

Also extracted the handleSave function and wrapped it in useCallback.

* test(brand_image_setting): add e2e test for deleting brand image

* test(brand_image_setting): use destructured functions

* chore: delete unnecessary comment

* Revert "test(brand_image_setting): use destructured functions"

This reverts commit 71dc6628ed.

* Fix bad merge

* Fully revert changes to test from merge

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
2026-04-09 09:16:23 -04:00
010aad6308 Fixed a bug where signup link showed up when signup was disabled (#35769)
* Fixed a bug where signup link showed up when signup was disabled

* Removed unused component

* fixed test name

* CI

* fixed a test

* fixed a commit

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-04-09 10:21:08 +05:30
Harrison HealeyandGitHub f9b6989824 Remove babel-plugin-typescript-to-proptypes and use of prop-types from web app (#35954)
* Remove unneeded references to PropTypes in TS code

* Add type definition file for SuggestionBox

* Fixed type definitions for SuggestionBoxProps and fixed usage of those props in other places

* Remove babel-plugin-typescript-to-proptypes

* Fix circular type reference and incorrect non-null assertion
2026-04-08 11:48:32 -04:00
Harrison HealeyandGitHub 220cd725cc MM-66887 Fix results in Invite to Team modal (#35936)
* Fix a bug in decomposeKorean that caused it to only decompose the first character

* MM-66887 Fix Invite To Team modal suggesting users one key press behind

* Cherry-pick updates to ime.ts from another branch

* And cherry-pick another bit

* Remove broken and unnecessary onBlur method from UsersEmailsInput

See https://github.com/mattermost/mattermost/pull/35936/changes#r3047500882 for more information
2026-04-08 10:11:24 -04:00
Doug LauderandGitHub 5b76fb11a5 MM-67647: Rename shared_channel_manager roles to follow system_ prefix convention (#35944)
* Rename shared_channel_manager and secure_connection_manager roles to use system_ prefix

  The new roles added in PR #35354 broke the naming convention that all
  system-level roles stored in Users.Roles are prefixed with "system_".
  Client-side code (role.includes('system')) and server-side code (explicit
  switch cases in applyMultiRoleFilters) relied on this convention, causing
  users assigned to these roles to not appear in the System Console.

  Also adds both roles to the applyMultiRoleFilters switch statement in
  user_store.go, which was missing them entirely.
2026-04-08 08:01:33 -04:00
Andre VasconcelosandGitHub 9a412c535f MM-67946 Added entity decoding to message attachments (#35667)
* MM-67945 Added entity decoding to message attachments

- Separated markdown utility to decode special characters with testing suite
- Applied it to remove_markdown utility and used it in

* Ensuring escaping uses RegExp.escape

* Removing footer decoding tests

* Added E2E tests for message attachment decoding

* Fixing linter errors
2026-04-08 13:36:15 +03:00
cf40f44023 Markdown message preview fixed (#34942)
* markdown message preview fixed

* message preview overflow fix

* fix show_more test

* restore package-lock.json

* pull package-lock from master

* package-lock line break

* Fix missing newline at end of package-lock.json

* Update test snapshots

---------

Co-authored-by: David Krauser <david@krauser.org>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: David Krauser <david@kruser.org>
2026-04-07 18:41:03 +00:00
Harrison HealeyandGitHub 83819e3db4 Specify target Safari version as a string (#35955)
This stops a warning from Babel which points out that passing a minor version
as a number will have issues because 16.2 is identical to 16.20.
2026-04-07 10:36:12 -04:00
unified-ci-app[bot]GitHubunified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
6662021dd5 Update latest minor version to 11.7.0 (#35964)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
2026-04-07 09:34:34 +03:00
sabrilandGitHub 1c26ab9464 test(enzyme migration): final bulk migration, removed enzyme dependencies and helpers (#35950) 2026-04-07 05:26:20 +00:00
f68557c179 Fix Enterprise Advanced upsell messaging for Enterprise licenses (#35933)
* Fix Enterprise Advanced upsell messaging for Enterprise licenses

Update the license settings upsell panel to highlight only Enterprise Advanced-exclusive capabilities so Enterprise customers are not shown features they already have.

Made-with: Cursor

* Update license settings snapshot for Enterprise upsell

Refresh the Enterprise license snapshot so the license settings test matches the new Enterprise Advanced upsell content.

Made-with: Cursor

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-04-06 10:25:13 -04:00
Andre VasconcelosandGitHub ca72686766 MM-67743 Fixing styling issues in Browse Channels modal (#35772)
* Fixing issues with browser channels modal

- Fixing "jumping around" issue on hover due to buttons being rendered dynamically
- Added max width for purpose so it doesn't take up the whole screen when long purpose is written

* Fixing modal overflow in mobile screen sizes

* Simplifying join button layout fix

* Fixing styles to be consistent with existing modals
2026-04-06 16:39:16 +03:00
Harshil SharmaandGitHub 0ca124fa8f Fixed a bug where attachment-only post would send on enter when when set to only send on ctrl/cmd + enter (#35828) 2026-04-06 08:50:40 +05:30
sabrilandGitHub 2b45e43e05 MM-66627 (test): VH1-8 + EC Enzyme to RTL bulk migration (#35768)
* (test): vh1-8+EC enzyme to rtl bulk migration

* address comments
2026-04-06 11:04:56 +08:00
JG HeithcockandGitHub 00b2594648 MM-68156: Fix space key clearing input in invite modal (#35913)
The invite modal's UsersEmailsInput component treated whitespace as a
token delimiter alongside comma and semicolon. This caused typing a
space (e.g., between a first and last name) to split and clear the
input field.

Split the delimiter regex into two: typedInputDelimiter (/[,;]+/) for
interactive typing and pasteDelimiter (/[\s,;]+/) for paste operations
where whitespace-separated values are expected. Added .trim() to split
entries to handle the comma-then-space typing pattern correctly.

Updated onboarding invite description text to reflect the new delimiter
behavior (comma or semicolon instead of space or comma).
2026-04-05 15:30:58 -07:00
Jesse HallamandGitHub f6d5d9e1bc [MM-67859] Update license renewal and expiry email branding (#35701) 2026-04-04 20:30:36 -03:00
Doug LauderandGitHub 3888a69479 MM-68158: Fix shared channel remote display and notify UI on invite completion (#35908)
* MM-68158: Fix shared channel remote display and add WebSocket notification

  Fix getSharedChannelRemotes API handler passing ChannelId instead of
  RemoteId to GetRemoteCluster, which always failed the lookup. Add
  RemoteId to SharedChannelRemoteStatus model and store query.

  Add shared_channel_remote_updated WebSocket event published from the
  onInvite callback so the UI refreshes its cached remote names when the
  async invite completes, instead of showing the generic "Shared with
  trusted organizations" fallback.

* Improved unit tests per review comments
2026-04-03 02:06:01 -04:00