Mattermost is an open source platform for secure collaboration across the entire software development lifecycle.. https://mattermost.com
  • TypeScript 50.1%
  • Go 41.4%
  • JavaScript 3.9%
  • SCSS 2.5%
  • HTML 1.8%
  • Other 0.2%
Find a file
cursor[bot] 53211e45b6
[MM-61861] Hide "Manage roles" for guests so "Promote to member" is the only promotion path (#38606)
* MM-61861: Hide "Manage roles" for guests in the System Console users list

Choosing Manage roles > Member for a guest sent PUT /users/{id}/roles with
"system_user", which rewrites the user record but leaves TeamMembers and
ChannelMembers on their guest scheme rows. The list then labelled the user
"Member" while every membership stayed Guest, so Team Admin assignment failed
and Channel Admin was unavailable.

Guest promotion is already handled by "Promote to member", which calls
POST /users/{id}/promote and migrates the user, team and channel rows in one
transaction. Hide the Manage roles entry for guests so that is the only path.

Co-authored-by: mattermost-code <matty-code@mattermost.com>

* MM-61861: Cover guest role-menu options in SystemUsersListAction tests

Assert that a guest only gets "Promote to member" while a member keeps
"Manage roles" and "Demote to guest", including the mixed system_guest
system_admin case and a non-system-admin viewer.

Co-authored-by: mattermost-code <matty-code@mattermost.com>

* MM-61861: Harden guest role-menu test coverage

Address the test-quality review: retarget the non-admin-viewer test at a
member so it actually guards the isCurrentUserSystemAdmin conjunct, add
click-through assertions that the guest path opens the promote confirmation
and the member path opens the manage roles modal, and cover the deactivated
guest and unlicensed cases.

Update MM-T1391, which asserted that "Manage roles" is shown for a guest, and
fix the sibling "Demote to Guest" expectation whose casing never matched the
rendered label.

Co-authored-by: mattermost-code <matty-code@mattermost.com>

* MM-61861: Fix test import order and drop inert license fixtures

Round-2 review follow-up: the DeepPartial import was ordered ahead of
UserProfile, which fails the webapp eslint check, and the guest-accounts
license state was threaded through six tests that never assert on
"Demote to guest".

Co-authored-by: mattermost-code <matty-code@mattermost.com>

* MM-61861: Tighten comments in the guest role-menu change

Co-authored-by: mattermost-code <matty-code@mattermost.com>

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

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: mattermost-code <matty-code@mattermost.com>
2026-09-23 16:23:42 -04:00
.cursor Clone missing enterprise checkout in Cloud Agent install (#38117) 2026-09-09 17:20:12 -04:00
.github Add workflow to auto-label docs PRs for editor review (#38717) 2026-09-23 09:01:23 -07:00
api Allow to hydrate posts with their attributes (#38134) 2026-09-22 15:21:20 +02:00
docs Fix K8s HA upgrade doc FAQ claiming manual DB schema migration (#38678) 2026-09-23 18:17:45 +00:00
e2e-tests [MM-61861] Hide "Manage roles" for guests so "Promote to member" is the only promotion path (#38606) 2026-09-23 16:23:42 -04:00
i18n/glossary Add i18n/glossary: core terminology for 21 supported locales (#38410) 2026-09-11 10:41:58 -03:00
server [MM-59493] Accept all 2xx responses from slash command integrations instead of only 200 OK (#38603) 2026-09-23 16:20:09 -04:00
tools MM-70626: Migrate sort to slices (#38473) 2026-09-15 14:39:50 +02:00
webapp [MM-61861] Hide "Manage roles" for guests so "Promote to member" is the only promotion path (#38606) 2026-09-23 16:23:42 -04:00
.editorconfig feat(docs): move docs-experimental content into monorepo docs/ (#37330) 2026-07-02 18:42:57 +03:00
.gitignore Stop package-lock.json from losing its peer markers (#38265) 2026-09-17 17:17:14 +05:30
.gitmodules docs: vendor and stage Mattermost Agents docs for Docusaurus build (#37627) 2026-07-24 16:56:13 +03:00
.gitpod.yml Add .gitpod.yml to use mattermost-gitpod-config repo for Gitpod configuration (#19984) 2022-04-14 11:02:50 -04:00
.nvmrc Tag the build server image on its Node version (#38281) 2026-09-03 14:32:25 -03:00
.yamllint ci: add yamllint workflow to detect duplicate YAML keys (#36010) 2026-04-20 17:25:12 -04:00
AGENTS.md Clone missing enterprise checkout in Cloud Agent install (#38117) 2026-09-09 17:20:12 -04:00
CHANGELOG.md Changelog link (#8805) 2018-05-30 10:23:25 -04:00
CODEOWNERS Require release team review for release documentation (#38097) 2026-08-24 13:22:51 +03:00
CONTRIBUTING.md update CONTRIBUTING.md and github ISSUE_TEMPLATE (#30862) 2025-04-29 15:42:40 +03:00
enable-claude-docs.sh Add optional Claude.md orchestration for Webapp folder (#34668) 2026-01-14 13:04:20 -05:00
LICENSE.enterprise Source available metrics (#24879) 2024-01-08 10:47:24 -04:00
LICENSE.txt Update LICENSE.txt to reflect new paths (#28241) 2024-10-01 09:47:09 -03:00
mise.toml Stop package-lock.json from losing its peer markers (#38265) 2026-09-17 17:17:14 +05:30
NOTICE.txt chore: Update NOTICE.txt file with updated dependencies (#38676) 2026-09-21 16:42:02 +03:00
README.md Drop RHEL 7/8 support: switch build image to golang-bookworm (#37229) 2026-08-18 10:59:32 +00:00
SECURITY.md MM-41988 Updated links to legacy domain about.mm.com (#19552) 2022-03-16 19:47:57 +08:00

Mattermost logo

Mattermost is an open core, self-hosted collaboration platform that offers chat, workflow automation, voice calling, screen sharing, and AI integration. This repo is the primary source for core development on the Mattermost platform; it's written in Go and React, runs as a single Linux binary, and relies on PostgreSQL. A new compiled version is released under an MIT license every month on the 16th.

Deploy Mattermost on-premises, or try it for free in the cloud.

mattermost user interface

Learn more about the following use cases with Mattermost:

Other useful resources:

Table of contents

Install Mattermost

Other install guides:

Native mobile and desktop apps

In addition to the web interface, you can also download Mattermost clients for Android, iOS, Windows PC, macOS, and Linux.

Get Mattermost on Google Play Get Mattermost on the App Store Get Mattermost on Windows PC Get Mattermost on Mac OSX Get Mattermost on Linux

Get security bulletins

Receive notifications of critical security updates. The sophistication of online attackers is perpetually increasing. If you're deploying Mattermost it's highly recommended you subscribe to the Mattermost Security Bulletin mailing list for updates on critical security releases.

Subscribe here

Get involved

Learn more

License

See the LICENSE file for license rights and limitations.

Get the latest news

Contributing

Small Image

Please see CONTRIBUTING.md. Join the Mattermost Contributors server to join community discussions about contributions, development, and more.