Mm 49496 Add state and jobs for preventing screened purchase attempts from retrying (#22188)

* make signup unavailable when screening is in progress
Этот коммит содержится в:
Nathaniel Allred
2023-02-02 15:48:59 -06:00
коммит произвёл GitHub
родитель a68515b69a
Коммит f713862041
7 изменённых файлов: 90 добавлений и 0 удалений

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

@@ -191,6 +191,13 @@ func (ps *PlatformService) SaveLicense(licenseBytes []byte) (*model.License, *mo
ps.RemoveLicense()
return nil, model.NewAppError("addLicense", "api.license.add_license.save_active.app_error", nil, "", http.StatusInternalServerError)
}
// only on prem licenses set this in the first place
if !license.IsCloud() {
_, err := ps.Store.System().PermanentDeleteByName(model.SystemHostedPurchaseNeedsScreening)
if err != nil {
ps.logger.Warn(fmt.Sprintf("Failed to remove %s system store key", model.SystemHostedPurchaseNeedsScreening))
}
}
ps.ReloadConfig()
ps.InvalidateAllCaches()