Reject mysql for enterprise advanced (#31164)

* reject MySQL with the enterprise advanced license

If a user attempts to set an Enterprise Advanced License while
configured with MySQL, reject the license. This SKU is not compatible
with MYSQL.

* fix trial typo

* suppress trial banner if MySQL

* Update server/channels/app/platform/license_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix types

* suppress mysql from show start trial modal

* Skip MySQL-incompatible tests for access control and channel banner features

Skip the following tests when running with MySQL database:
- Access control policy tests (create, get, delete, check/test expressions, search, assign/unassign, get channels)
- Channel banner tests in TestPatchChannel and TestCanEditChannelBanner

These features are not supported on MySQL and the tests would fail.
Tests will continue to run normally on PostgreSQL.

🤖 Generated with [Claude Code](https://claude.ai/code)

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

* Skip TestSearchChannelsForAccessControlPolicy subtest for MySQL

Add MySQL skip logic to the "SearchChannelsForAccessControlPolicy with regular user"
subtest as this access control feature is not supported on MySQL.

🤖 Generated with [Claude Code](https://claude.ai/code)

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

* reject trial license requests for MySQL

* return false on sku + mysql match, even if logger is nil

* Fix MySQL trial license tests to skip appropriately based on database driver

🤖 Generated with [Claude Code](https://claude.ai/code)

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Этот коммит содержится в:
Jesse Hallam
2025-05-26 15:44:32 -03:00
коммит произвёл GitHub
родитель f2bb82bc01
Коммит 70a42ffd5f
14 изменённых файлов: 244 добавлений и 5 удалений

Просмотреть файл

@@ -2316,6 +2316,10 @@
"id": "api.license.add_license.invalid_count.app_error",
"translation": "Unable to count total unique users."
},
{
"id": "api.license.add_license.mysql.app_error",
"translation": "This license does not support MySQL."
},
{
"id": "api.license.add_license.no_file.app_error",
"translation": "No file under 'license' in request."
@@ -2368,6 +2372,10 @@
"id": "api.license.request-trial.can-start-trial.not-allowed",
"translation": "Failed to apply new trial license as your workspace has already applied a trial license. If you would like to extend your trial period please [contact our sales team](https://mattermost.com/contact-us/)."
},
{
"id": "api.license.request-trial.mysql.app_error",
"translation": "Trial licenses are not supported for MySQL databases. Please use PostgreSQL to access trial features."
},
{
"id": "api.license.request_trial_license.app_error",
"translation": "Unable to get a trial license, please try again or contact with support@mattermost.com."