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 authored Jan 9, 2024
1 parent e2ab34a commit 635826d
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,17 +16,24 @@
namespace CustomerManagementFrameworkBundle\Controller\Admin;

use CustomerManagementFrameworkBundle\GDPR\DataProvider\Customers;
use Pimcore\Controller\KernelControllerEventInterface;
use Pimcore\Model\DataObject\AbstractObject;
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 \Pimcore\Bundle\AdminBundle\Controller\AdminController
class GDPRDataController extends \Pimcore\Bundle\AdminBundle\Controller\AdminController implements KernelControllerEventInterface
{
public function onKernelControllerEvent(ControllerEvent $event): void
{
$this->checkPermission('gdpr_data_extractor');
}

/**
* @param Request $request
* @param Customers $service
Expand Down

0 comments on commit 635826d

Please sign in to comment.