Removes UmbracoTreeAuthorizeAttribute and migrates usages to authz policies

This commit is contained in:
Shannon
2020-11-19 19:23:41 +11:00
parent 64609475d3
commit daaade185e
30 changed files with 308 additions and 164 deletions

View File

@@ -1,5 +1,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Umbraco.Core.Services;
using Umbraco.Web.BackOffice.Authorization;
using Umbraco.Web.BackOffice.Filters;
using Umbraco.Web.Common.Attributes;
using Umbraco.Web.Models.Trees;
@@ -9,7 +11,7 @@ using Constants = Umbraco.Core.Constants;
namespace Umbraco.Web.BackOffice.Trees
{
[UmbracoTreeAuthorize(Constants.Trees.Packages)]
[Authorize(Policy = AuthorizationPolicies.TreeAccessPackages)]
[Tree(Constants.Applications.Packages, Constants.Trees.Packages, SortOrder = 0, IsSingleNodeTree = true)]
[PluginController(Constants.Web.Mvc.BackOfficeTreeArea)]
[CoreTree]