[MM-58378] Prevent prepackaged playbook v2 from upgrading on servers without enterprise license (#27335)

* add check for playbooks v2

* add new license helper

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Julien Tant
2024-07-26 02:03:44 -07:00
коммит произвёл GitHub
родитель eb6336ce7a
Коммит 5547504c1d
2 изменённых файлов: 22 добавлений и 0 удалений

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

@@ -385,6 +385,11 @@ func (l *License) HasSharedChannels() bool {
l.SkuShortName == LicenseShortSkuEnterprise
}
// IsE20OrEnterprise returns true when the license is for E20 or Enterprise.
func (l *License) IsE20OrEnterprise() bool {
return l.SkuShortName == LicenseShortSkuE20 || l.SkuShortName == LicenseShortSkuEnterprise
}
// NewTestLicense returns a license that expires in the future and has the given features.
func NewTestLicense(features ...string) *License {
ret := &License{