Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/linux-paths
# Conflicts: # src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/HostedServices/TempFileCleanupTests.cs # src/Umbraco.Web.Common/Extensions/UmbracoCoreServiceCollectionExtensions.cs
This commit is contained in:
@@ -11,6 +11,7 @@ using Umbraco.Core.Hosting;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Mapping;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Strings;
|
||||
using Umbraco.Core.Strings.Css;
|
||||
@@ -35,7 +36,8 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
private readonly IHostingEnvironment _hostingEnvironment;
|
||||
private readonly IFileSystems _fileSystems;
|
||||
private readonly IFileService _fileService;
|
||||
private readonly IUmbracoContextAccessor _umbracoContextAccessor;
|
||||
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
|
||||
|
||||
private readonly ILocalizedTextService _localizedTextService;
|
||||
private readonly UmbracoMapper _umbracoMapper;
|
||||
private readonly IShortStringHelper _shortStringHelper;
|
||||
@@ -45,7 +47,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
IHostingEnvironment hostingEnvironment,
|
||||
IFileSystems fileSystems,
|
||||
IFileService fileService,
|
||||
IUmbracoContextAccessor umbracoContextAccessor,
|
||||
IBackOfficeSecurityAccessor backOfficeSecurityAccessor,
|
||||
ILocalizedTextService localizedTextService,
|
||||
UmbracoMapper umbracoMapper,
|
||||
IShortStringHelper shortStringHelper,
|
||||
@@ -54,7 +56,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
_hostingEnvironment = hostingEnvironment;
|
||||
_fileSystems = fileSystems;
|
||||
_fileService = fileService;
|
||||
_umbracoContextAccessor = umbracoContextAccessor;
|
||||
_backOfficeSecurityAccessor = backOfficeSecurityAccessor;
|
||||
_localizedTextService = localizedTextService;
|
||||
_umbracoMapper = umbracoMapper;
|
||||
_shortStringHelper = shortStringHelper;
|
||||
@@ -73,7 +75,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
if (display == null) throw new ArgumentNullException("display");
|
||||
if (string.IsNullOrWhiteSpace(type)) throw new ArgumentException("Value cannot be null or whitespace.", "type");
|
||||
|
||||
var currentUser = _umbracoContextAccessor.GetRequiredUmbracoContext().Security.CurrentUser;
|
||||
var currentUser = _backOfficeSecurityAccessor.BackOfficeSecurity.CurrentUser;
|
||||
switch (type)
|
||||
{
|
||||
case Core.Constants.Trees.PartialViews:
|
||||
@@ -323,7 +325,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
if (string.IsNullOrWhiteSpace(virtualPath)) throw new ArgumentException("Value cannot be null or whitespace.", "virtualPath");
|
||||
|
||||
virtualPath = System.Web.HttpUtility.UrlDecode(virtualPath);
|
||||
var currentUser = _umbracoContextAccessor.GetRequiredUmbracoContext().Security.CurrentUser;
|
||||
var currentUser = _backOfficeSecurityAccessor.BackOfficeSecurity.CurrentUser;
|
||||
switch (type)
|
||||
{
|
||||
case Constants.Trees.PartialViews:
|
||||
@@ -556,7 +558,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
? relPath + display.Name
|
||||
: relPath.EnsureEndsWith('/') + display.Name;
|
||||
}
|
||||
var currentUser = _umbracoContextAccessor.GetRequiredUmbracoContext().Security.CurrentUser;
|
||||
var currentUser = _backOfficeSecurityAccessor.BackOfficeSecurity.CurrentUser;
|
||||
var file = getFileByName(relPath);
|
||||
if (file != null)
|
||||
{
|
||||
@@ -609,7 +611,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
display.Name = EnsureCorrectFileExtension(display.Name, ".cshtml");
|
||||
|
||||
Attempt<IPartialView> partialViewResult;
|
||||
var currentUser = _umbracoContextAccessor.GetRequiredUmbracoContext().Security.CurrentUser;
|
||||
var currentUser = _backOfficeSecurityAccessor.BackOfficeSecurity.CurrentUser;
|
||||
|
||||
var virtualPath = NormalizeVirtualPath(display.VirtualPath, systemDirectory);
|
||||
var view = getView(virtualPath);
|
||||
|
||||
Reference in New Issue
Block a user