From 88593b0bf3a39a21ae23b2e6a6d64e52b4140941 Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 18 Oct 2016 16:16:46 +0200 Subject: [PATCH] Deal with fixme in FacadeRouter --- src/Umbraco.Web/Routing/FacadeRouter.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web/Routing/FacadeRouter.cs b/src/Umbraco.Web/Routing/FacadeRouter.cs index 84b8e2555d..839a239435 100644 --- a/src/Umbraco.Web/Routing/FacadeRouter.cs +++ b/src/Umbraco.Web/Routing/FacadeRouter.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Threading; using System.Globalization; using System.IO; +using System.Web.Security; using umbraco; using Umbraco.Core; using Umbraco.Core.Configuration.UmbracoSettings; @@ -44,7 +45,8 @@ namespace Umbraco.Web.Routing ContentFinderCollection contentFinders, IContentLastChanceFinder contentLastChanceFinder, ServiceContext services, - ProfilingLogger proflog) + ProfilingLogger proflog, + Func> getRolesForLogin = null) { if (webRoutingSection == null) throw new ArgumentNullException(nameof(webRoutingSection)); // fixme usage? @@ -58,10 +60,11 @@ namespace Umbraco.Web.Routing _services = services; _profilingLogger = proflog; _logger = proflog.Logger; + + GetRolesForLogin = getRolesForLogin ?? (s => Roles.Provider.GetRolesForUser(s)); } - // fixme - private Func> GetRolesForLogin; + private Func> GetRolesForLogin { get; } public PublishedContentRequest CreateRequest(UmbracoContext umbracoContext, Uri uri = null) {