Skip to content

Commit

Permalink
Merge pull request #5439 from dlubitz/90/bugfix/fix-usage-controller-…
Browse files Browse the repository at this point in the history
…after-upmerge

BUGFIX: Fix class usages in UsageController
  • Loading branch information
dlubitz authored Jan 16, 2025
2 parents 255366d + d21509c commit 6bcf212
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Neos.Media.Browser/Classes/Controller/UsageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@

use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindClosestNodeFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints;
use Neos\ContentRepository\Core\SharedModel\Workspace\Workspace;
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Flow\Annotations as Flow;
use Neos\Flow\Mvc\Controller\ActionController;
use Neos\Flow\Security\Authorization\PrivilegeManagerInterface;
use Neos\Flow\Security\Context;
use Neos\Media\Domain\Model\AssetInterface;
use Neos\Media\Domain\Service\AssetService;
use Neos\Neos\AssetUsage\Dto\AssetUsageReference;
Expand Down Expand Up @@ -68,7 +71,7 @@ class UsageController extends ActionController

/**
* @Flow\Inject
* @var SecurityContext
* @var Context
*/
protected $securityContext;

Expand Down Expand Up @@ -125,7 +128,7 @@ public function relatedNodesAction(AssetInterface $asset)
$workspacePermissions = $this->contentRepositoryAuthorizationService->getWorkspacePermissions($currentContentRepositoryId, $usage->getWorkspaceName(), $this->securityContext->getRoles(), $this->userService->getBackendUser()?->getId());
$workspace = $contentRepository->findWorkspaceByName($usage->getWorkspaceName());

$inaccessibleRelation['label'] = $this->getLabelForInaccessibleWorkspace($workspace);
$inaccessibleRelation['label'] = $workspace && $this->getLabelForInaccessibleWorkspace($workspace);
$inaccessibleRelation['nodeIdentifier'] = $usage->getNodeAggregateId()->value;
$inaccessibleRelation['workspaceName'] = $usage->getWorkspaceName()->value;
$inaccessibleRelation['workspace'] = $workspace;
Expand Down

0 comments on commit 6bcf212

Please sign in to comment.