Files
Umbraco-CMS/src/Umbraco.Web.Common/Controllers/UmbracoApiControllerBase.cs

27 lines
949 B
C#
Raw Normal View History

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Features;
using Umbraco.Cms.Web.Common.Attributes;
using Umbraco.Cms.Web.Common.Authorization;
2020-04-20 12:20:47 +02:00
namespace Umbraco.Cms.Web.Common.Controllers;
/// <summary>
/// Provides a base class for Umbraco API controllers.
/// </summary>
/// <remarks>
/// <para>These controllers are NOT auto-routed.</para>
/// <para>The base class is <see cref="ControllerBase" /> which are netcore API controllers without any view support</para>
/// </remarks>
[Authorize(Policy = AuthorizationPolicies.UmbracoFeatureEnabled)] // TODO: This could be part of our conventions
[UmbracoApiController]
public abstract class UmbracoApiControllerBase : ControllerBase, IUmbracoFeature
2020-04-20 12:20:47 +02:00
{
/// <summary>
/// Initializes a new instance of the <see cref="UmbracoApiControllerBase" /> class.
2020-04-20 12:20:47 +02:00
/// </summary>
protected UmbracoApiControllerBase()
2020-04-20 12:20:47 +02:00
{
}
}