https://github.com/umbraco/Umbraco-CMS/issues/8856 - Aligned namespaces of controllers and also determine BackOfficeApiArea as backoffice

Signed-off-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
Bjarke Berg
2020-09-22 11:07:01 +02:00
parent 525ca95acf
commit 02e3cc7c30
6 changed files with 9 additions and 6 deletions

View File

@@ -39,7 +39,7 @@ using Umbraco.Web.Models.Mapping;
using Umbraco.Web.Security;
using Umbraco.Web.WebApi.Filters;
namespace Umbraco.Web.Editors
namespace Umbraco.Web.BackOffice.Controllers
{
/// <summary>
/// The API controller used for editing content

View File

@@ -12,7 +12,7 @@ using Umbraco.Web.BackOffice.Controllers;
using Umbraco.Web.Common.Attributes;
using Umbraco.Web.Common.Filters;
namespace Umbraco.Web.Editors
namespace Umbraco.Web.BackOffice.Controllers
{
[PluginController("UmbracoApi")]
public class IconController : UmbracoAuthorizedApiController

View File

@@ -20,10 +20,11 @@ using Umbraco.Web.BackOffice.Controllers;
using Umbraco.Web.BackOffice.Filters;
using Umbraco.Web.Common.Attributes;
using Umbraco.Web.Common.Exceptions;
using Umbraco.Web.Editors;
using Umbraco.Web.Routing;
using Umbraco.Web.Security;
namespace Umbraco.Web.Editors
namespace Umbraco.Web.BackOffice.Controllers
{
/// <summary>
/// An API controller used for dealing with member types

View File

@@ -13,7 +13,7 @@ using Umbraco.Web.Security;
using Umbraco.Web.Services;
using Umbraco.Web.Trees;
namespace Umbraco.Web.Editors
namespace Umbraco.Web.BackOffice.Controllers
{
/// <summary>
/// The API controller used for using the list of sections

View File

@@ -14,7 +14,7 @@ namespace Umbraco.Web.Common.ApplicationModels
public BackOfficeApplicationModelProvider(IModelMetadataProvider modelMetadataProvider)
{
ActionModelConventions = new List<IActionModelConvention>()
{
{
new BackOfficeIdentityCultureConvention()
};
}
@@ -52,7 +52,8 @@ namespace Umbraco.Web.Common.ApplicationModels
{
var pluginControllerAttribute = controller.Attributes.OfType<PluginControllerAttribute>().FirstOrDefault();
return pluginControllerAttribute != null
&& pluginControllerAttribute.AreaName == Core.Constants.Web.Mvc.BackOfficeArea;
&& (pluginControllerAttribute.AreaName == Core.Constants.Web.Mvc.BackOfficeArea
|| pluginControllerAttribute.AreaName == Core.Constants.Web.Mvc.BackOfficeApiArea);
}
}
}

View File

@@ -12,6 +12,7 @@ namespace Umbraco.Web.Common.Filters
{
public void OnActionExecuted(ActionExecutedContext context)
{
}
public void OnActionExecuting(ActionExecutingContext context)