Add Auth attribute to controller (#15178)

This commit is contained in:
Nikolaj Geisle
2023-11-10 14:14:32 +01:00
committed by GitHub
parent f4cb7e71fa
commit 7c87743191

View File

@@ -1,3 +1,4 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Mapping;
@@ -6,11 +7,13 @@ using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Webhooks;
using Umbraco.Cms.Web.BackOffice.Services;
using Umbraco.Cms.Web.Common.Attributes;
using Umbraco.Cms.Web.Common.Authorization;
using Umbraco.Cms.Web.Common.Models;
namespace Umbraco.Cms.Web.BackOffice.Controllers;
[PluginController(Constants.Web.Mvc.BackOfficeApiArea)]
[Authorize(Policy = AuthorizationPolicies.TreeAccessWebhooks)]
public class WebhookController : UmbracoAuthorizedJsonController
{
private readonly IWebhookService _webhookService;