[CLD-7567] Deprecate Self Serve: Second Pass (#26853)

* Deprecate Self Serve: First Pass

* Fix ci

* Fix more ci

* Remmove outdated server tests

* Fix a missed spot opening purchase modal in Self Hosted

* Fix i18n

* Clean up some more server code, fix webapp test

* Fix alignment of button

* Fix linter

* Fix i18n server side

* Deprecate in product true up

* Add back translation

* Remove client functions

* Put back client functions

* webapp deprecation

* Deprecate Self Serve: Second Pass

* Fix various pipeline issues

* Fix linter

* Fix pipelines

* Fix handlers_test.go

* Fix console.error around hostedCustomer in reducer

* PICKY LINTER PLEASE

* Fix webapp tests, various other fixes for the CI pipelines

* Fix i18n

* Updates to accomadate enterprise code removal

* Fix mocks

* More removal

* Fix

* Adjustments from PR

* Fixes for QA Feedback

* Update

* Add migrations to remove true up review history

* Fix migrations check

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: maria.nunez <maria.nunez@mattermost.com>
Этот коммит содержится в:
Nick Misasi
2024-05-02 09:15:15 -04:00
коммит произвёл GitHub
родитель 6028cbe4e2
Коммит f1019d076e
127 изменённых файлов: 169 добавлений и 8222 удалений

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

@@ -1296,16 +1296,6 @@ func (s *Server) sendLicenseUpForRenewalEmail(users map[string]*model.User, lice
daysToExpiration := license.DaysToExpiration()
ctaLink, tokenToBeUsedForRenew, appErr := s.GenerateLicenseRenewalLink()
if appErr != nil {
return model.NewAppError("s.sendLicenseUpForRenewalEmail", "api.server.license_up_for_renewal.error_generating_link", nil, "", http.StatusInternalServerError).Wrap(appErr)
}
status, err := s.Cloud.GetLicenseSelfServeStatus("", tokenToBeUsedForRenew)
if err != nil {
return model.NewAppError("s.sendLicenseUpForRenewalEmail", "api.cloud.request_error", nil, "", http.StatusInternalServerError).Wrap(err)
}
// we want to at least have one email sent out to an admin
countNotOks := 0
@@ -1315,13 +1305,10 @@ func (s *Server) sendLicenseUpForRenewalEmail(users map[string]*model.User, lice
name = user.Username
}
T := i18n.GetUserTranslations(user.Locale)
ctaTitle := T("api.templates.license_up_for_renewal_subtitle_two")
ctaText := T("api.templates.license_up_for_renewal_renew_now")
if !status.IsRenewable {
ctaTitle = ""
ctaText = T("api.templates.license_up_for_renewal_contact_sales")
ctaLink = "https://mattermost.com/contact-sales/"
}
ctaTitle := ""
ctaText := T("api.templates.license_up_for_renewal_contact_sales")
ctaLink := "https://mattermost.com/contact-sales/"
if err := s.EmailService.SendLicenseUpForRenewalEmail(user.Email, name, user.Locale, *s.platform.Config().ServiceSettings.SiteURL, ctaTitle, ctaLink, ctaText, daysToExpiration); err != nil {
mlog.Error("Error sending license up for renewal email to", mlog.String("user_email", user.Email), mlog.Err(err))
@@ -1383,18 +1370,6 @@ func (s *Server) doLicenseExpirationCheck() {
return
}
ctaLink, tokenToBeUsedForRenew, appErr := s.GenerateLicenseRenewalLink()
if appErr != nil {
mlog.Debug(model.NewAppError("s.sendLicenseUpForRenewalEmail", "api.server.license_up_for_renewal.error_generating_link", nil, "", http.StatusInternalServerError).Wrap(appErr).Error())
return
}
status, err := s.Cloud.GetLicenseSelfServeStatus("", tokenToBeUsedForRenew)
if err != nil {
mlog.Debug(model.NewAppError("s.sendLicenseUpForRenewalEmail", "api.cloud.request_error", nil, "", http.StatusInternalServerError).Wrap(err).Error())
return
}
//send email to admin(s)
for _, user := range users {
user := user
@@ -1404,11 +1379,8 @@ func (s *Server) doLicenseExpirationCheck() {
}
T := i18n.GetUserTranslations(user.Locale)
ctaText := T("api.templates.remove_expired_license.body.renew_button")
if !status.IsRenewable {
ctaText = T("api.templates.license_up_for_renewal_contact_sales")
ctaLink = "https://mattermost.com/contact-sales/"
}
ctaText := T("api.templates.license_up_for_renewal_contact_sales")
ctaLink := "https://mattermost.com/contact-sales/"
mlog.Debug("Sending license expired email.", mlog.String("user_email", user.Email))
s.Go(func() {