Skip to content

Commit

Permalink
[Bug]: Fix GDPR search-data-objects permission (#525)
Browse files Browse the repository at this point in the history
* Update GDPRDataController.php

* fix typo

* Apply php-cs-fixer changes

---------

Co-authored-by: kingjia90 <kingjia90@users.noreply.github.com>
  • Loading branch information
kingjia90 and kingjia90 committed Jan 9, 2024
1 parent d1f3efb commit 6c34515
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Controller/Admin/GDPRDataController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,29 @@
namespace CustomerManagementFrameworkBundle\Controller\Admin;

use CustomerManagementFrameworkBundle\GDPR\DataProvider\Customers;
use Pimcore\Controller\KernelControllerEventInterface;
use Pimcore\Controller\Traits\JsonHelperTrait;
use Pimcore\Controller\UserAwareController;
use Pimcore\Model\DataObject\AbstractObject;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Event\ControllerEvent;
use Symfony\Component\Routing\Annotation\Route;

/**
* Class DataObjectController
*
* @Route("/gdpr-data")
*/
class GDPRDataController extends UserAwareController
class GDPRDataController extends UserAwareController implements KernelControllerEventInterface
{
use JsonHelperTrait;

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

/**
* @Route("/search-data-objects", name="_pimcore_customermanagementframework_gdprdata_searchdataobjects", methods={"GET"})
*/
Expand Down

0 comments on commit 6c34515

Please sign in to comment.