Only filter post retrieval of entities for start nodes if working with entities that support start nodes. (#18287)

This commit is contained in:
Andy Butland
2025-02-17 12:45:51 +01:00
committed by GitHub
parent def7ebd48c
commit 18047a7cfb

View File

@@ -895,6 +895,7 @@ public class EntityController : UmbracoAuthorizedJsonController
// Filtering out child nodes after getting a paged result is an active choice here, even though the pagination might get off.
// This has been the case with this functionality in Umbraco for a long time.
.Where(entity => ignoreUserStartNodes ||
(objectType == UmbracoObjectTypes.Document || objectType == UmbracoObjectTypes.Media) is false ||
(ContentPermissions.IsInBranchOfStartNode(entity.Path, startNodeIds, startNodePaths, out var hasPathAccess) &&
hasPathAccess))
.Select(source =>