From cac807b504eb31e728a9ba853ef5c27cde597354 Mon Sep 17 00:00:00 2001 From: Bastian Waidelich Date: Tue, 19 Mar 2024 12:59:51 +0100 Subject: [PATCH] BUGFIX: Remove invalid `isDisabledContentShown()` method This is a follow-up to the Subtree Tags introduction (#4659) that removes the now unsued `VisibilityConstraints::isDisabledContentShown()` *Note:* The implementation of this method was incorrect but instead of fixing that I decided to remove it since we should no longer rely on this and instead refer to the public `VisibilityConstraints::tagConstraints` field Related #4550 --- .../src/Domain/Repository/Query/QueryUtility.php | 13 ++----------- .../ContentGraph/VisibilityConstraints.php | 5 ----- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/QueryUtility.php b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/QueryUtility.php index 6eb66e73b86..6710f6d44c9 100644 --- a/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/QueryUtility.php +++ b/Neos.ContentGraph.PostgreSQLAdapter/src/Domain/Repository/Query/QueryUtility.php @@ -28,18 +28,9 @@ public static function getRestrictionClause( string $tableNamePrefix, string $prefix = '' ): string { - if ($visibilityConstraints->isDisabledContentShown()) { - return ''; - } + // TODO evaluate $visibilityConstraints->tagConstraints {@see Neos\ContentGraph\DoctrineDbalAdapter\Domain\Repository\ContentSubgraph::addSubtreeTagConstraints} - return ' - AND NOT EXISTS ( - SELECT 1 - FROM ' . $tableNamePrefix . '_restrictionhyperrelation rest - WHERE rest.contentstreamid = ' . $prefix . 'h.contentstreamid - AND rest.dimensionspacepointhash = ' . $prefix . 'h.dimensionspacepointhash - AND ' . $prefix . 'n.nodeaggregateid = ANY(rest.affectednodeaggregateids) - )'; + return ''; } /** diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/VisibilityConstraints.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/VisibilityConstraints.php index cb01f67a2cf..b3d6f466c7e 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/VisibilityConstraints.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/VisibilityConstraints.php @@ -34,11 +34,6 @@ private function __construct( ) { } - public function isDisabledContentShown(): bool - { - return $this->tagConstraints->contain(SubtreeTag::disabled()); - } - public function getHash(): string { return md5(implode('|', $this->tagConstraints->toStringArray()));