Adds new event so we know when umbraco routes a value, ensure the IUmbracoWebsiteSecurity is initialized for front-end requests, cleans up some of the routing middleware, adds lots of notes
This commit is contained in:
@@ -14,7 +14,6 @@ using Microsoft.AspNetCore.TestHost;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Cms.Core.Cache;
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
using Umbraco.Cms.Core.DependencyInjection;
|
||||
@@ -25,6 +24,7 @@ using Umbraco.Cms.Tests.Integration.Testing;
|
||||
using Umbraco.Cms.Web.BackOffice.Controllers;
|
||||
using Umbraco.Cms.Web.Common.Controllers;
|
||||
using Umbraco.Cms.Web.Website.Controllers;
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Extensions;
|
||||
using Constants = Umbraco.Cms.Core.Constants;
|
||||
|
||||
@@ -122,6 +122,10 @@ namespace Umbraco.Cms.Tests.Integration.TestServerTest
|
||||
}
|
||||
};
|
||||
|
||||
// TODO: This dependency chain is broken and needs to be fixed.
|
||||
// This is required to be called before EnsureUmbracoContext else the UmbracoContext's IBackOfficeSecurity instance is null
|
||||
// This is a very ugly Temporal Coupling which also means that developers can no longer just use IUmbracoContextFactory the
|
||||
// way it was intended.
|
||||
backofficeSecurityFactory.EnsureBackOfficeSecurity();
|
||||
umbracoContextFactory.EnsureUmbracoContext();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user