Revert "Cleans up BackofficeSecurity, fixes up AuthenticationController for endpoints that aren't authorized (and simplifies)"
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using Microsoft.AspNetCore.Mvc.ApplicationModels;
|
||||
using Umbraco.Web.Common.Filters;
|
||||
|
||||
namespace Umbraco.Web.Common.ApplicationModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Ensures all requests with this convention are authenticated with the back office scheme
|
||||
/// </summary>
|
||||
public class AuthenticateAsBackOfficeSchemeConvention : IActionModelConvention
|
||||
{
|
||||
public void Apply(ActionModel action)
|
||||
{
|
||||
action.Filters.Add(new EnsureUmbracoBackOfficeAuthentication());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,8 @@ namespace Umbraco.Web.Common.ApplicationModels
|
||||
{
|
||||
ActionModelConventions = new List<IActionModelConvention>()
|
||||
{
|
||||
new BackOfficeIdentityCultureConvention()
|
||||
new BackOfficeIdentityCultureConvention(),
|
||||
new AuthenticateAsBackOfficeSchemeConvention()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user