]> Raphaël G. Git Repositories - airbundle/commitdiff
Use checker for isGranted
authorRaphaël Gertz <git@rapsys.eu>
Thu, 29 Feb 2024 13:54:33 +0000 (14:54 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Thu, 29 Feb 2024 13:54:33 +0000 (14:54 +0100)
Handler/AccessDeniedHandler.php

index 13727c9628c2d3e85163261c189d34bf7e691b81..961b5260e7d1e856868b03bf9abc285a10a24edd 100644 (file)
@@ -35,7 +35,7 @@ class AccessDeniedHandler extends AbstractController implements AccessDeniedHand
                $this->context['message'] = $exception->getMessage();
 
                //With admin
-               if ($this->isGranted('ROLE_ADMIN')) {
+               if ($this->checker->isGranted('ROLE_ADMIN')) {
                        //Add trace for admin
                        $this->context['trace'] = $exception->getTraceAsString();
                }