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:
Mole
2020-09-22 13:44:22 +02:00
89 changed files with 741 additions and 521 deletions

View File

@@ -0,0 +1,30 @@
using Umbraco.Core.Cache;
using Umbraco.Core.Security;
using Umbraco.Web;
using Umbraco.Web.Security;
namespace Umbraco.Core
{
public class HybridBackofficeSecurityAccessor : HybridAccessorBase<IBackofficeSecurity>, IBackofficeSecurityAccessor
{
/// <summary>
/// Initializes a new instance of the <see cref="HybridUmbracoContextAccessor"/> class.
/// </summary>
public HybridBackofficeSecurityAccessor(IRequestCache requestCache)
: base(requestCache)
{ }
/// <inheritdoc />
protected override string ItemKey => "Umbraco.Web.HybridBackofficeSecurityAccessor";
/// <summary>
/// Gets or sets the <see cref="BackofficeSecurity"/> object.
/// </summary>
public IBackofficeSecurity BackofficeSecurity
{
get => Value;
set => Value = value;
}
}
}

View File

@@ -0,0 +1,15 @@
using Umbraco.Web.Security;
namespace Umbraco.Core
{
/// <summary>
/// Creates and manages <see cref="IBackofficeSecurity"/> instances.
/// </summary>
public interface IBackofficeSecurityFactory
{
/// <summary>
/// Ensures that a current <see cref="IBackofficeSecurity"/> exists.
/// </summary>
void EnsureBackofficeSecurity();
}
}

View File

@@ -16,9 +16,9 @@ namespace Umbraco.Web
DateTime ObjectCreated { get; }
/// <summary>
/// Gets the WebSecurity class
/// Gets the BackofficeSecurity class
/// </summary>
IWebSecurity Security { get; }
IBackofficeSecurity Security { get; }
/// <summary>
/// Gets the uri that is handled by ASP.NET after server-side rewriting took place.

View File

@@ -4,7 +4,7 @@ using Umbraco.Core.Models.Membership;
namespace Umbraco.Web.Security
{
public interface IWebSecurity
public interface IBackofficeSecurity
{
/// <summary>
/// Gets the current user.

View File

@@ -0,0 +1,9 @@
using Umbraco.Web.Security;
namespace Umbraco.Core.Security
{
public interface IBackofficeSecurityAccessor
{
IBackofficeSecurity BackofficeSecurity { get; set; }
}
}