Merge remote-tracking branch 'origin/v10/dev' into v11/dev

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.Common/Routing/InstallAreaRoutesTests.cs
This commit is contained in:
Bjarke Berg
2022-12-14 08:51:45 +01:00
15 changed files with 233 additions and 36 deletions

View File

@@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
@@ -120,6 +121,13 @@ public class BackOfficeController : UmbracoController
// Check if we not are in an run state, if so we need to redirect
if (_runtimeState.Level != RuntimeLevel.Run)
{
if (_runtimeState.Level == RuntimeLevel.Upgrade)
{
return RedirectToAction(nameof(AuthorizeUpgrade), routeValues: new RouteValueDictionary()
{
["redir"] = _globalSettings.GetBackOfficePath(_hostingEnvironment),
});
}
return Redirect("/");
}