diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php index b3c7f42c2ce2..f310b78cc8a3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php @@ -123,11 +123,11 @@ protected function addFlash($type, $message) */ protected function isGranted($attributes, $object = null) { - if (!$this->container->has('security.context')) { + if (!$this->container->has('security.authorization_checker')) { throw new \LogicException('The SecurityBundle is not registered in your application.'); } - return $this->container->get('security.context')->isGranted($attributes, $object); + return $this->container->get('security.authorization_checker')->isGranted($attributes, $object); } /**