From 67dbc6af267a7ea36f1e0f810947811b2101a5b9 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 5 Sep 2022 21:05:59 +0200 Subject: [PATCH 1/2] Bump Version --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index ec2a88ea63..9ea16ab589 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "10.1.0", + "version": "10.1.1", "assemblyVersion": { "precision": "Build" // optional. Use when you want a more precise assembly version than the default major.minor. }, From 7b00c0d3e9e3da88f7f2b9cc8f88df28851e5d76 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 5 Sep 2022 21:11:17 +0200 Subject: [PATCH 2/2] Limit what API does when not in used in Install level --- .../Install/InstallApiController.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.BackOffice/Install/InstallApiController.cs b/src/Umbraco.Web.BackOffice/Install/InstallApiController.cs index 3dfc9f51b1..2bac71504f 100644 --- a/src/Umbraco.Web.BackOffice/Install/InstallApiController.cs +++ b/src/Umbraco.Web.BackOffice/Install/InstallApiController.cs @@ -86,11 +86,15 @@ public class InstallApiController : ControllerBase [HttpPost] public async Task CompleteInstall() { + RuntimeLevel levelBeforeRestart = _runtime.State.Level; + await _runtime.RestartAsync(); - BackOfficeIdentityUser identityUser = - await _backOfficeUserManager.FindByIdAsync(Constants.Security.SuperUserIdAsString); - _backOfficeSignInManager.SignInAsync(identityUser, false); + if (levelBeforeRestart == RuntimeLevel.Install) + { + BackOfficeIdentityUser identityUser = await _backOfficeUserManager.FindByIdAsync(Core.Constants.Security.SuperUserIdAsString); + _backOfficeSignInManager.SignInAsync(identityUser, false); + } return NoContent(); }