Skip to content

Commit

Permalink
BUGFIX: Cannot compute pending changes for live workspace as it has n…
Browse files Browse the repository at this point in the history
…o base

Thus we need to hide it

This is all temporary code and will be replaced via

#5132
  • Loading branch information
mhsdesign committed Oct 30, 2024
1 parent d5f7b7c commit 568907e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Neos.Workspace.Ui/Classes/Controller/WorkspaceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ public function indexAction(): void
$items = [];
$allWorkspaces = $contentRepository->findWorkspaces();
foreach ($allWorkspaces as $workspace) {
if ($workspace->isRootWorkspace()) {
continue;
}
$workspaceMetadata = $this->workspaceService->getWorkspaceMetadata($contentRepositoryId, $workspace->workspaceName);
$permissions = $this->workspaceService->getWorkspacePermissionsForUser($contentRepositoryId, $workspace->workspaceName, $currentUser);
if (!$permissions->read) {
Expand All @@ -145,7 +148,7 @@ public function indexAction(): void
classification: $workspaceMetadata->classification->name,
title: $workspaceMetadata->title->value,
description: $workspaceMetadata->description->value,
baseWorkspaceName: $workspace->baseWorkspaceName?->value,
baseWorkspaceName: $workspace->baseWorkspaceName->value,
pendingChanges: $this->computePendingChanges($workspace, $contentRepository),
hasDependantWorkspaces: !$allWorkspaces->getDependantWorkspaces($workspace->workspaceName)->isEmpty(),
permissions: $permissions,
Expand Down

0 comments on commit 568907e

Please sign in to comment.