fix: refresh entitlements after creating first user (#12285)

This commit is contained in:
Marcin Tojek
2024-02-23 16:48:24 +00:00
committed by GitHub
parent 2cb9bfd517
commit 90db6683c4
7 changed files with 64 additions and 15 deletions
+10
View File
@@ -191,6 +191,16 @@ func (api *API) postFirstUser(rw http.ResponseWriter, r *http.Request) {
return
}
if api.RefreshEntitlements != nil {
err = api.RefreshEntitlements(ctx)
if err != nil {
api.Logger.Error(ctx, "failed to refresh entitlements after generating trial license")
return
}
} else {
api.Logger.Debug(ctx, "entitlements will not be refreshed")
}
telemetryUser := telemetry.ConvertUser(user)
// Send the initial users email address!
telemetryUser.Email = &user.Email