feat: complete tenant site provisioning flow
This commit is contained in:
@@ -18,6 +18,7 @@ var isDevelopment = builder.Environment.IsDevelopment() ||
|
||||
Environments.Development,
|
||||
StringComparison.OrdinalIgnoreCase);
|
||||
var bootstrapPlatformAdmin = args.Contains("--bootstrap-platform-admin", StringComparer.Ordinal);
|
||||
var skipDevelopmentSeed = args.Contains("--skip-development-seed", StringComparer.Ordinal);
|
||||
PlatformAdminBootstrapOptions? bootstrapOptions = null;
|
||||
if (bootstrapPlatformAdmin)
|
||||
{
|
||||
@@ -39,7 +40,7 @@ builder.Services.AddApplication();
|
||||
builder.Services.AddAuthentication();
|
||||
builder.Services.AddInfrastructure(
|
||||
connectionString,
|
||||
isDevelopment && !bootstrapPlatformAdmin
|
||||
isDevelopment && !bootstrapPlatformAdmin && !skipDevelopmentSeed
|
||||
? DevelopmentPlatformAdminSeeder.Configure
|
||||
: null);
|
||||
// Resolving UserManager<User> also activates Identity's default token providers.
|
||||
@@ -55,6 +56,8 @@ var dbContext = scope.ServiceProvider.GetRequiredService<TikuDbContext>();
|
||||
await dbContext.Database.MigrateAsync();
|
||||
var catalogSeeder = ActivatorUtilities.CreateInstance<BuiltinBackofficeCatalogSeeder>(scope.ServiceProvider);
|
||||
await catalogSeeder.SeedAsync();
|
||||
var starterOfferingSeeder = ActivatorUtilities.CreateInstance<BuiltinStarterOfferingSeeder>(scope.ServiceProvider);
|
||||
await starterOfferingSeeder.SeedAsync();
|
||||
|
||||
if (bootstrapOptions is not null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user