Refactor startup user creation and add HomeSection config
Refactored user initialization to always ensure at least one user exists at startup. If no users are present, a default admin user (admin/jellyfin) is created automatically. Updated StartupController endpoints to handle cases where no user exists. Simplified UserManager.InitializeAsync logic. Added HomeSectionConfiguration for EF Core entity mapping. Includes minor project and assembly info updates.
This commit is contained in:
@@ -600,13 +600,9 @@ namespace Emby.Server.Implementations
|
||||
|
||||
FindParts();
|
||||
|
||||
// Ensure at least one user exists for the startup wizard
|
||||
// Ensure at least one user exists
|
||||
var userManager = Resolve<IUserManager>();
|
||||
if (!ConfigurationManager.Configuration.IsStartupWizardCompleted)
|
||||
{
|
||||
Logger.LogInformation("Startup wizard not completed, ensuring initial user exists");
|
||||
await userManager.InitializeAsync().ConfigureAwait(false);
|
||||
}
|
||||
await userManager.InitializeAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private X509Certificate2 GetCertificate(string path, string password)
|
||||
|
||||
Reference in New Issue
Block a user