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:
@@ -15,6 +15,7 @@ using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Configuration.Grid;
|
||||
using Umbraco.Core.Configuration.Models;
|
||||
using Umbraco.Core.Hosting;
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.WebAssets;
|
||||
using Umbraco.Extensions;
|
||||
@@ -45,7 +46,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
private readonly BackOfficeServerVariables _backOfficeServerVariables;
|
||||
private readonly AppCaches _appCaches;
|
||||
private readonly BackOfficeSignInManager _signInManager;
|
||||
private readonly IWebSecurity _webSecurity;
|
||||
private readonly IBackofficeSecurityAccessor _backofficeSecurityAccessor;
|
||||
private readonly ILogger<BackOfficeController> _logger;
|
||||
|
||||
public BackOfficeController(
|
||||
@@ -59,7 +60,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
BackOfficeServerVariables backOfficeServerVariables,
|
||||
AppCaches appCaches,
|
||||
BackOfficeSignInManager signInManager,
|
||||
IWebSecurity webSecurity,
|
||||
IBackofficeSecurityAccessor backofficeSecurityAccessor,
|
||||
ILogger<BackOfficeController> logger)
|
||||
{
|
||||
_userManager = userManager;
|
||||
@@ -72,7 +73,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
_backOfficeServerVariables = backOfficeServerVariables;
|
||||
_appCaches = appCaches;
|
||||
_signInManager = signInManager;
|
||||
_webSecurity = webSecurity;
|
||||
_backofficeSecurityAccessor = backofficeSecurityAccessor;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
@@ -93,7 +94,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
//if you are hitting VerifyInvite, you're already signed in as a different user, and the token is invalid
|
||||
//you'll exit on one of the return RedirectToAction(nameof(Default)) but you're still logged in so you just get
|
||||
//dumped at the default admin view with no detail
|
||||
if (_webSecurity.IsAuthenticated())
|
||||
if (_backofficeSecurityAccessor.BackofficeSecurity.IsAuthenticated())
|
||||
{
|
||||
await _signInManager.SignOutAsync();
|
||||
}
|
||||
@@ -186,7 +187,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
[HttpGet]
|
||||
public Dictionary<string, Dictionary<string, string>> LocalizedText(string culture = null)
|
||||
{
|
||||
var isAuthenticated = _webSecurity.IsAuthenticated();
|
||||
var isAuthenticated = _backofficeSecurityAccessor.BackofficeSecurity.IsAuthenticated();
|
||||
|
||||
var cultureInfo = string.IsNullOrWhiteSpace(culture)
|
||||
//if the user is logged in, get their culture, otherwise default to 'en'
|
||||
|
||||
Reference in New Issue
Block a user