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,8 +1,10 @@
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Umbraco.Core;
using Umbraco.Core.Services;
using Umbraco.Web.BackOffice.Authorization;
using Umbraco.Web.BackOffice.Filters;
using Umbraco.Web.Common.Attributes;
using Umbraco.Web.Models.Trees;
@@ -11,7 +13,7 @@ using Umbraco.Web.WebApi;
namespace Umbraco.Web.BackOffice.Trees
{
[UmbracoTreeAuthorize(Constants.Trees.MemberGroups)]
[Authorize(Policy = AuthorizationPolicies.TreeAccessMemberGroups)]
[Tree(Constants.Applications.Members, Constants.Trees.MemberGroups, SortOrder = 1)]
[PluginController(Constants.Web.Mvc.BackOfficeTreeArea)]
[CoreTree]