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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace Umbraco.Web.Common.Filters
|
||||
{
|
||||
public void OnActionExecuted(ActionExecutedContext context)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnActionExecuting(ActionExecutingContext context)
|
||||
|
||||
Reference in New Issue
Block a user