Skip to content

Commit

Permalink
Fix: improper access
Browse files Browse the repository at this point in the history
  • Loading branch information
robertSt7 committed Jan 8, 2024
1 parent 0aa1a40 commit f434210
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Controller/Admin/DuplicatesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use CustomerManagementFrameworkBundle\DuplicatesIndex\DuplicatesIndexInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Event\ControllerEvent;
use Symfony\Component\Routing\Annotation\Route;

/**
Expand All @@ -32,6 +33,12 @@ public function init()
\Pimcore\Model\DataObject\AbstractObject::setHideUnpublished(true);
}

public function onKernelControllerEvent(ControllerEvent $event): void
{
parent::onKernelControllerEvent($event);
$this->checkPermission('plugin_cmf_perm_customerview');
}

/**
* @param Request $request
* @param DuplicatesIndexInterface $duplicatesIndex
Expand Down

0 comments on commit f434210

Please sign in to comment.