* Added premium SKU

* removed duplicate enterprise license check functions

* Added license check on API layer

* lint fix

* lint fix

* refactured signature:

* test: Add comprehensive tests for license tier check functions

* fixed test

* text update

* optimised license checks

* fixedf test

* Updated license valid function

* webapp license checks

* handling prekium SKU in webappp:

* added plugin api method and general refactoring

* Updated tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Harshil Sharma
2025-04-03 13:07:54 +05:30
коммит произвёл GitHub
родитель 21ca303b5e
Коммит a9f09cadc2
30 изменённых файлов: 409 добавлений и 163 удалений

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

@@ -55,16 +55,14 @@ func postPriorityCheck(
}
if ack := priority.RequestedAck; ack != nil && *ack {
licenseErr := model.MinimumProfessionalProvidedLicense(license)
if licenseErr != nil {
return licenseErr
if !model.MinimumProfessionalLicense(license) {
return model.NewAppError("", "license_error.feature_unavailable", nil, "feature is not available for the current license", http.StatusNotImplemented)
}
}
if notification := priority.PersistentNotifications; notification != nil && *notification {
licenseErr := model.MinimumProfessionalProvidedLicense(license)
if licenseErr != nil {
return licenseErr
if !model.MinimumProfessionalLicense(license) {
return model.NewAppError("", "license_error.feature_unavailable", nil, "feature is not available for the current license", http.StatusNotImplemented)
}
if !isPersistentNotificationsEnabled {
return priorityForbiddenErr