Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/migrate-logging
# Conflicts: # src/Umbraco.Infrastructure/Scheduling/ScheduledPublishing.cs # src/Umbraco.Infrastructure/Scheduling/SchedulerComponent.cs # src/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Filters/ContentModelValidatorTests.cs # src/Umbraco.Web.BackOffice/Controllers/BackOfficeController.cs # src/Umbraco.Web.BackOffice/Controllers/CurrentUserController.cs # src/Umbraco.Web.BackOffice/Controllers/MacrosController.cs # src/Umbraco.Web.BackOffice/Controllers/PackageInstallController.cs # src/Umbraco.Web.BackOffice/Controllers/RedirectUrlManagementController.cs # src/Umbraco.Web.BackOffice/Controllers/UsersController.cs # src/Umbraco.Web.BackOffice/Filters/ContentModelValidator.cs # src/Umbraco.Web.BackOffice/Filters/ContentSaveModelValidator.cs # src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs # src/Umbraco.Web.BackOffice/Filters/MediaItemSaveValidationAttribute.cs # src/Umbraco.Web.BackOffice/Filters/MediaSaveModelValidator.cs # src/Umbraco.Web.BackOffice/Filters/MemberSaveModelValidator.cs # src/Umbraco.Web.BackOffice/Filters/MemberSaveValidationAttribute.cs # src/Umbraco.Web.BackOffice/Trees/ContentTreeController.cs # src/Umbraco.Web.BackOffice/Trees/ContentTreeControllerBase.cs # src/Umbraco.Web.BackOffice/Trees/MediaTreeController.cs # src/Umbraco.Web.Common/Install/InstallController.cs
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Models.Packaging;
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Net;
|
||||
using Umbraco.Web.Install.Models;
|
||||
using Umbraco.Web.Security;
|
||||
@@ -17,16 +18,16 @@ namespace Umbraco.Web.Install.InstallSteps
|
||||
internal class StarterKitDownloadStep : InstallSetupStep<Guid?>
|
||||
{
|
||||
private readonly InstallHelper _installHelper;
|
||||
private readonly IWebSecurity _webSecurity;
|
||||
private readonly IBackofficeSecurityAccessor _backofficeSecurityAccessor;
|
||||
private readonly IUmbracoVersion _umbracoVersion;
|
||||
private readonly IUmbracoApplicationLifetime _umbracoApplicationLifetime;
|
||||
private readonly IContentService _contentService;
|
||||
private readonly IPackagingService _packageService;
|
||||
|
||||
public StarterKitDownloadStep(IContentService contentService, IPackagingService packageService, InstallHelper installHelper, IWebSecurity webSecurity, IUmbracoVersion umbracoVersion, IUmbracoApplicationLifetime umbracoApplicationLifetime)
|
||||
public StarterKitDownloadStep(IContentService contentService, IPackagingService packageService, InstallHelper installHelper, IBackofficeSecurityAccessor backofficeSecurityAccessor, IUmbracoVersion umbracoVersion, IUmbracoApplicationLifetime umbracoApplicationLifetime)
|
||||
{
|
||||
_installHelper = installHelper;
|
||||
_webSecurity = webSecurity;
|
||||
_backofficeSecurityAccessor = backofficeSecurityAccessor;
|
||||
_umbracoVersion = umbracoVersion;
|
||||
_umbracoApplicationLifetime = umbracoApplicationLifetime;
|
||||
_contentService = contentService;
|
||||
@@ -67,7 +68,7 @@ namespace Umbraco.Web.Install.InstallSteps
|
||||
private async Task<(string packageFile, int packageId)> DownloadPackageFilesAsync(Guid kitGuid)
|
||||
{
|
||||
//Go get the package file from the package repo
|
||||
var packageFile = await _packageService.FetchPackageFileAsync(kitGuid, _umbracoVersion.Current, _webSecurity.GetUserId().ResultOr(0));
|
||||
var packageFile = await _packageService.FetchPackageFileAsync(kitGuid, _umbracoVersion.Current, _backofficeSecurityAccessor.BackofficeSecurity.GetUserId().ResultOr(0));
|
||||
if (packageFile == null) throw new InvalidOperationException("Could not fetch package file " + kitGuid);
|
||||
|
||||
//add an entry to the installedPackages.config
|
||||
@@ -77,7 +78,7 @@ namespace Umbraco.Web.Install.InstallSteps
|
||||
|
||||
_packageService.SaveInstalledPackage(packageDefinition);
|
||||
|
||||
_packageService.InstallCompiledPackageFiles(packageDefinition, packageFile, _webSecurity.GetUserId().ResultOr(-1));
|
||||
_packageService.InstallCompiledPackageFiles(packageDefinition, packageFile, _backofficeSecurityAccessor.BackofficeSecurity.GetUserId().ResultOr(-1));
|
||||
|
||||
return (compiledPackage.PackageFile.Name, packageDefinition.Id);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Net;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Install.Models;
|
||||
@@ -15,13 +16,13 @@ namespace Umbraco.Web.Install.InstallSteps
|
||||
internal class StarterKitInstallStep : InstallSetupStep<object>
|
||||
{
|
||||
private readonly IUmbracoApplicationLifetime _umbracoApplicationLifetime;
|
||||
private readonly IWebSecurity _webSecurity;
|
||||
private readonly IBackofficeSecurityAccessor _backofficeSecurityAccessor;
|
||||
private readonly IPackagingService _packagingService;
|
||||
|
||||
public StarterKitInstallStep(IUmbracoApplicationLifetime umbracoApplicationLifetime, IWebSecurity webSecurity, IPackagingService packagingService)
|
||||
public StarterKitInstallStep(IUmbracoApplicationLifetime umbracoApplicationLifetime, IBackofficeSecurityAccessor backofficeSecurityAccessor, IPackagingService packagingService)
|
||||
{
|
||||
_umbracoApplicationLifetime = umbracoApplicationLifetime;
|
||||
_webSecurity = webSecurity;
|
||||
_backofficeSecurityAccessor = backofficeSecurityAccessor;
|
||||
_packagingService = packagingService;
|
||||
}
|
||||
|
||||
@@ -48,7 +49,7 @@ namespace Umbraco.Web.Install.InstallSteps
|
||||
|
||||
var packageFile = new FileInfo(definition.PackagePath);
|
||||
|
||||
_packagingService.InstallCompiledPackageData(definition, packageFile, _webSecurity.GetUserId().ResultOr(-1));
|
||||
_packagingService.InstallCompiledPackageData(definition, packageFile, _backofficeSecurityAccessor.BackofficeSecurity.GetUserId().ResultOr(-1));
|
||||
}
|
||||
|
||||
public override bool RequiresExecution(object model)
|
||||
|
||||
Reference in New Issue
Block a user