Skip to content

Commit 9ae99ec

Browse files
committed
IBX-10170: Refactored access check to use new contract interface
1 parent 34dcee2 commit 9ae99ec

File tree

2 files changed

+4
-39
lines changed

2 files changed

+4
-39
lines changed

src/bundle/EventSubscriber/PerformAccessCheckSubscriber.php

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/contracts/Controller/Controller.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@
99
namespace Ibexa\Contracts\AdminUi\Controller;
1010

1111
use Ibexa\Contracts\Core\Repository\Values\Content\Location;
12+
use Ibexa\Contracts\User\Controller\AccessCheckController;
13+
use Ibexa\Contracts\User\Controller\AuthenticatedRememberedCheckTrait;
1214
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
1315
use Symfony\Component\HttpFoundation\RedirectResponse;
1416

15-
abstract class Controller extends AbstractController
17+
abstract class Controller extends AbstractController implements AccessCheckController
1618
{
17-
public function performAccessCheck(): void
18-
{
19-
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
20-
}
19+
use AuthenticatedRememberedCheckTrait;
2120

2221
public function redirectToLocation(Location $location, string $uriFragment = ''): RedirectResponse
2322
{

0 commit comments

Comments
 (0)