From 32f5514297195a0899233b5b3d9fc93576fcc7a6 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Sat, 17 Feb 2024 09:45:20 +0100 Subject: [PATCH] TASK: Update todo about 9.0 permissions in `MenuHelper` With #4269 the behaviour was changed in 8.3, when this is reimplemented we should also loop through all possible dimensions. Originally the permissions here were introduced as bugfix via #4025 --- Neos.Neos/Classes/Controller/Backend/MenuHelper.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Neos.Neos/Classes/Controller/Backend/MenuHelper.php b/Neos.Neos/Classes/Controller/Backend/MenuHelper.php index 5f9b0415c9c..4c9988e3916 100644 --- a/Neos.Neos/Classes/Controller/Backend/MenuHelper.php +++ b/Neos.Neos/Classes/Controller/Backend/MenuHelper.php @@ -87,10 +87,15 @@ public function buildSiteList(ControllerContext $controllerContext): array $domainsFound = false; $sites = []; foreach ($this->siteRepository->findOnline() as $site) { - // TODO: we need to check permissions here, a.k.a - // TODO: $node = $context->getNode(\Neos\ContentRepository\Domain\Utility\NodePaths::addNodePathSegment(SiteService::SITES_ROOT_PATH, $site->getNodeName())); - // TODO: if ($this->privilegeManager->isGranted(NodeTreePrivilege::class, new NodePrivilegeSubject($node))) { - // TODO: unfortunately, it's not so easy; because we do not know what dimension we are in... + // TODO: we need to check permissions here see https://github.com/neos/neos-development-collection/pull/4269 + /* + foreach ($siteNodesInAllDimensions as $siteNode) { + if ($this->privilegeManager->isGranted(NodeTreePrivilege::class, new NodePrivilegeSubject($siteNode))) { + $granted = true; + break; + } + } + */ $uri = null; $active = false; /** @var $site Site */