diff --git a/src/Umbraco.Infrastructure.PublishedCache/Umbraco.Infrastructure.PublishedCache.csproj b/src/Umbraco.Infrastructure.PublishedCache/Umbraco.Infrastructure.PublishedCache.csproj index d4c30668c5..f818df2d41 100644 --- a/src/Umbraco.Infrastructure.PublishedCache/Umbraco.Infrastructure.PublishedCache.csproj +++ b/src/Umbraco.Infrastructure.PublishedCache/Umbraco.Infrastructure.PublishedCache.csproj @@ -15,6 +15,9 @@ + + <_Parameter1>Umbraco.Web + <_Parameter1>Umbraco.Tests diff --git a/src/Umbraco.Web/Editors/NuCacheStatusController.cs b/src/Umbraco.Web/Editors/NuCacheStatusController.cs index 0f50682e77..3494b7ba96 100644 --- a/src/Umbraco.Web/Editors/NuCacheStatusController.cs +++ b/src/Umbraco.Web/Editors/NuCacheStatusController.cs @@ -21,12 +21,10 @@ namespace Umbraco.Web.Editors { get { - // TODO: do we need this? - //var svc = _publishedSnapshotService as PublishedSnapshotService; - //if (svc == null) - // throw new NotSupportedException("Not running NuCache."); - // return svc; - return _publishedSnapshotService; + var svc = _publishedSnapshotService as PublishedSnapshotService; + if (svc == null) + throw new NotSupportedException("Not running NuCache."); + return svc; } } diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index fe42d5a165..73696bc8d4 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -28,6 +28,7 @@ namespace Umbraco.Web private static UmbracoContext UmbracoContext => Current.UmbracoContext; private static ISiteDomainHelper SiteDomainHelper => Current.Factory.GetInstance(); private static IVariationContextAccessor VariationContextAccessor => Current.VariationContextAccessor; + private static IUserService UserService => Current.Services.UserService; #region IsComposedOf @@ -795,6 +796,20 @@ namespace Umbraco.Web #endregion + #region Writer and creator + + public static string CreatorName(this IPublishedContent content) + { + return content.GetCreatorName(UserService); + } + + public static string WriterName(this IPublishedContent content) + { + return content.GetWriterName(UserService); + } + + #endregion + #region Url ///