mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: refresh entitlements after creating first user (#12285)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user