[MM-40407] - Do not show the Renew Now if the license id does not exist in the portal (#19188)

* [MM-40407] - Do not show the Renew Now if the license id does not exist in the portal

* improvements

* impl mock

* fix translations

* feedback impl

* fix typo

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Allan Guwatudde
2021-12-21 09:46:02 +03:00
коммит произвёл GitHub
родитель 34c4e543f9
Коммит 81409ee7c4
6 изменённых файлов: 34 добавлений и 6 удалений

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

@@ -1644,7 +1644,7 @@ func (s *Server) sendLicenseUpForRenewalEmail(users map[string]*model.User, lice
daysToExpiration := license.DaysToExpiration()
renewalLink, appErr := s.GenerateLicenseRenewalLink()
renewalLink, _, appErr := s.GenerateLicenseRenewalLink()
if appErr != nil {
return model.NewAppError("s.sendLicenseUpForRenewalEmail", "api.server.license_up_for_renewal.error_generating_link", nil, appErr.Error(), http.StatusInternalServerError)
}
@@ -1735,7 +1735,7 @@ func (s *Server) doLicenseExpirationCheck() {
// SendRemoveExpiredLicenseEmail formats an email and uses the email service to send the email to user with link pointing to CWS
// to renew the user license
func (s *Server) SendRemoveExpiredLicenseEmail(email string, locale, siteURL string) *model.AppError {
renewalLink, err := s.GenerateLicenseRenewalLink()
renewalLink, _, err := s.GenerateLicenseRenewalLink()
if err != nil {
return err
}