Skip to content

Commit

Permalink
TASK: Update todo about 9.0 permissions in MenuHelper
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mhsdesign committed Feb 17, 2024
1 parent 023a2fe commit 32f5514
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Neos.Neos/Classes/Controller/Backend/MenuHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 32f5514

Please sign in to comment.