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:
30
src/Umbraco.Core/HybridBackofficeSecurityAccessor.cs
Normal file
30
src/Umbraco.Core/HybridBackofficeSecurityAccessor.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
15
src/Umbraco.Core/IBackofficeSecurityFactory.cs
Normal file
15
src/Umbraco.Core/IBackofficeSecurityFactory.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
@@ -4,7 +4,7 @@ using Umbraco.Core.Models.Membership;
|
||||
|
||||
namespace Umbraco.Web.Security
|
||||
{
|
||||
public interface IWebSecurity
|
||||
public interface IBackofficeSecurity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the current user.
|
||||
9
src/Umbraco.Core/Security/IBackofficeSecurityAccessor.cs
Normal file
9
src/Umbraco.Core/Security/IBackofficeSecurityAccessor.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Umbraco.Web.Security;
|
||||
|
||||
namespace Umbraco.Core.Security
|
||||
{
|
||||
public interface IBackofficeSecurityAccessor
|
||||
{
|
||||
IBackofficeSecurity BackofficeSecurity { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user