From af59a7a0b9ebd6f9d0b8fa798b6e7223c0cd9e47 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 15 Sep 2020 13:47:54 +0200 Subject: [PATCH] Do not login after install. This currently leads to issues due to the restart. --- .../Install/InstallApiController.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Umbraco.Web.Common/Install/InstallApiController.cs b/src/Umbraco.Web.Common/Install/InstallApiController.cs index edc73ef293..3470553c56 100644 --- a/src/Umbraco.Web.Common/Install/InstallApiController.cs +++ b/src/Umbraco.Web.Common/Install/InstallApiController.cs @@ -30,21 +30,19 @@ namespace Umbraco.Web.Common.Install private readonly DatabaseBuilder _databaseBuilder; private readonly InstallStatusTracker _installStatusTracker; private readonly IUmbracoApplicationLifetime _umbracoApplicationLifetime; - private readonly BackOfficeSignInManager _backOfficeSignInManager; private readonly InstallStepCollection _installSteps; private readonly ILogger _logger; private readonly IProfilingLogger _proflog; public InstallApiController(DatabaseBuilder databaseBuilder, IProfilingLogger proflog, InstallHelper installHelper, InstallStepCollection installSteps, InstallStatusTracker installStatusTracker, - IUmbracoApplicationLifetime umbracoApplicationLifetime, BackOfficeSignInManager backOfficeSignInManager) + IUmbracoApplicationLifetime umbracoApplicationLifetime) { _databaseBuilder = databaseBuilder ?? throw new ArgumentNullException(nameof(databaseBuilder)); _proflog = proflog ?? throw new ArgumentNullException(nameof(proflog)); _installSteps = installSteps; _installStatusTracker = installStatusTracker; _umbracoApplicationLifetime = umbracoApplicationLifetime; - _backOfficeSignInManager = backOfficeSignInManager; InstallHelper = installHelper; _logger = _proflog; } @@ -90,14 +88,6 @@ namespace Umbraco.Web.Common.Install [HttpPost] public async Task CompleteInstall() { - // log the super user in if it's a new install - var installType = InstallHelper.GetInstallationType(); - if (installType == InstallationType.NewInstall) - { - var user = await _backOfficeSignInManager.UserManager.FindByIdAsync(Constants.Security.SuperUserId.ToString()); - await _backOfficeSignInManager.SignInAsync(user, false); - } - _umbracoApplicationLifetime.Restart(); return NoContent(); }