2657f70938 [MM-71062] Health Dashboard PR26: rules for license and seats (#38916)
* [MM-71062] Add license seat and expiry snapshot accessors

LicenseSeats and LicenseExpiresAt read the leader's license summary, so
license rules give the same answer offline as live.

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

* [MM-71062] Add health rules for license and adoption

Ten rules in a new license area package: license expiry, trial license,
seat utilization and the enforced seat limit, monthly engagement, and
how much of Mattermost's integration surface is in use. Seats are
counted the way the server counts them, and expiry is measured against
the snapshot's collection time.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* [MM-71062] Report why license and adoption rules are unknown

Unknown results now carry the shared reason for the missing source
(license, stats, plugins, collection time) instead of an empty id.
SEATS_LOW_ENGAGEMENT keeps its own reason for a server with no active
users, which no shared reason describes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* [MM-71062] Simplify license rules

Reuse seatUtilization in the seat limit rule, use License.IsTrialLicense,
and trim comments.

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

* [MM-71062] Count single-channel guests as seats when guest accounts are disabled

Mirror GetServerLimits, which only exempts single-channel guests while
guest accounts are enabled. Keep the trial rule on the raw IsTrial flag
so live and Support Packet results agree.

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

* [MM-71062] Describe seats as counting toward the license limit

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

* [MM-71062] Evaluate the engagement and workflow usage rules on Cloud

Cloud admins can change these settings, unlike the cloud_restrictable
ones or the pages RestrictSystemAdmin hides.

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

* [MM-71062] Read the license rules' inputs from leader diagnostics

Snapshot.License is now an accessor over the Support Packet license
summary, so the rules and their tests read it from the leader node.

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

* [MM-71062] Fix shadowed ok in seatsUsed

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

* [MM-71062] Align the latest version in the packet-without-expiry parity check

* [MM-71062] Remove code text from engagement subtest names

* [MM-71062] Record the canonical trial status in the Support Packet

Use License.IsTrialLicense() so trials recognized only by their duration are reported as trials.

* [MM-71062] Describe seats as counted users and qualify license removal

The seat messages count users who take a seat, not active users. The server never removes an expired Mattermost Entry license, so the removal consequence moves from the remediation into the message, with an Entry variant that omits it.

* [MM-71062] Drop the trial, utilization, engagement and workflow rules

LICENSE_TRIAL duplicated LICENSE_EXPIRING for the whole trial; the trial
status now selects a trial variant of the expiry messages instead.
SEATS_LOW_UTILIZATION, SEATS_LOW_ENGAGEMENT and the WORKFLOW_USAGE codes
are account-management signals, not problems an admin can fix.

* [MM-71062] Move the seat rule tests to seats_test.go

* [MM-71062] Simplify the seat rule helpers

* [MM-71062] Add SupportPacketLicense.IsMattermostEntry

* Drop the unreachable Entry message from LICENSE_EXPIRED

LoadLicense rebuilds the Entry license in memory with a fresh 100-day
expiry every time it runs, so an Entry snapshot can never reach either
expiry rule.

* Resolve both license expiry rules for Mattermost Entry

The server never expires an Entry license, so neither rule should fire
for one, matching doLicenseExpirationCheck.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-19 12:27:33 +00:00
2026-10-04 12:35:53 +08:00
2018-05-30 10:23:25 -04: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.

S
Description
Mattermost is an open source platform for secure collaboration across the entire software development lifecycle..
Readme AGPL-3.0, Apache-2.0
2.6 GiB
0 Stars 3 Watchers 0 Forks
Languages
TypeScript 48.9%
Go 41.8%
JavaScript 5.1%
SCSS 2.3%
HTML 1.4%
Other 0.3%