Merge branch 'netcore/netcore' into netcore/feature/migrate-logging

This commit is contained in:
Nikolaj
2020-09-16 08:59:30 +02:00

View File

@@ -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<InstallApiController> _logger;
private readonly IProfilingLogger _proflog;
public InstallApiController(DatabaseBuilder databaseBuilder, IProfilingLogger proflog, ILogger<InstallApiController> logger,
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 = logger;
}
@@ -90,14 +88,6 @@ namespace Umbraco.Web.Common.Install
[HttpPost]
public async Task<ActionResult> 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();
}