From b7a1cd5ab47533cf8bb776bf0db396e83d56268e Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 24 Oct 2023 10:08:28 +0200 Subject: [PATCH] Cleaned up V14 TODOs from ContentApiItemControllerBase (#15026) --- .../Content/ContentApiItemControllerBase.cs | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/Umbraco.Cms.Api.Delivery/Controllers/Content/ContentApiItemControllerBase.cs b/src/Umbraco.Cms.Api.Delivery/Controllers/Content/ContentApiItemControllerBase.cs index 895cd376cd..b5c2cfe70d 100644 --- a/src/Umbraco.Cms.Api.Delivery/Controllers/Content/ContentApiItemControllerBase.cs +++ b/src/Umbraco.Cms.Api.Delivery/Controllers/Content/ContentApiItemControllerBase.cs @@ -1,35 +1,18 @@ using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.DependencyInjection; using Umbraco.Cms.Core.DeliveryApi; -using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Models.PublishedContent; using Umbraco.Cms.Core.Security; -using Umbraco.Cms.Core.Services; namespace Umbraco.Cms.Api.Delivery.Controllers.Content; public abstract class ContentApiItemControllerBase : ContentApiControllerBase { - // TODO: Remove this in V14 when the obsolete constructors have been removed - private readonly IPublicAccessService _publicAccessService; - - [Obsolete($"Please use the constructor that does not accept {nameof(IPublicAccessService)}. Will be removed in V14.")] - protected ContentApiItemControllerBase( - IApiPublishedContentCache apiPublishedContentCache, - IApiContentResponseBuilder apiContentResponseBuilder, - IPublicAccessService publicAccessService) - : this(apiPublishedContentCache, apiContentResponseBuilder) - { - } - protected ContentApiItemControllerBase( IApiPublishedContentCache apiPublishedContentCache, IApiContentResponseBuilder apiContentResponseBuilder) : base(apiPublishedContentCache, apiContentResponseBuilder) - => _publicAccessService = StaticServiceProvider.Instance.GetRequiredService(); - - [Obsolete($"Please use {nameof(IPublicAccessService)} to test for content protection. Will be removed in V14.")] - protected bool IsProtected(IPublishedContent content) => _publicAccessService.IsProtected(content.Path); + { + } protected async Task HandleMemberAccessAsync(IPublishedContent contentItem, IRequestMemberAccessService requestMemberAccessService) {