[FrameworkBundle] Update deprecated service call
The service `security.context` is now deprecated due to PR #11690. This commit updates PR #11593 replacing `security.context` with `security.authorization_checker` in the `isGranted()` controller shortcut.
This commit is contained in:
parent
309de6dd61
commit
2625193bd1
@ -123,11 +123,11 @@ class Controller extends ContainerAware
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user