Revert "Ensures that all back office controllers are authenticated under the back office scheme"
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -6,8 +6,6 @@ using Umbraco.Web.Common.Attributes;
|
||||
|
||||
namespace Umbraco.Web.Common.ApplicationModels
|
||||
{
|
||||
// TODO: This should just exist in the back office project
|
||||
|
||||
/// <summary>
|
||||
/// An application model provider for all Umbraco Back Office controllers
|
||||
/// </summary>
|
||||
@@ -17,8 +15,7 @@ namespace Umbraco.Web.Common.ApplicationModels
|
||||
{
|
||||
ActionModelConventions = new List<IActionModelConvention>()
|
||||
{
|
||||
new BackOfficeIdentityCultureConvention(),
|
||||
new AuthenticateAsBackOfficeSchemeConvention()
|
||||
new BackOfficeIdentityCultureConvention()
|
||||
};
|
||||
}
|
||||
|
||||
@@ -52,7 +49,12 @@ namespace Umbraco.Web.Common.ApplicationModels
|
||||
}
|
||||
|
||||
private bool IsBackOfficeController(ControllerModel controller)
|
||||
=> controller.Attributes.OfType<IsBackOfficeAttribute>().Any();
|
||||
|
||||
{
|
||||
var pluginControllerAttribute = controller.Attributes.OfType<PluginControllerAttribute>().FirstOrDefault();
|
||||
return pluginControllerAttribute != null
|
||||
&& (pluginControllerAttribute.AreaName == Core.Constants.Web.Mvc.BackOfficeArea
|
||||
|| pluginControllerAttribute.AreaName == Core.Constants.Web.Mvc.BackOfficeApiArea
|
||||
|| pluginControllerAttribute.AreaName == Core.Constants.Web.Mvc.BackOfficeTreeArea);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user