protected function isGranted($attributes, $object = null, $field = null)
{
if (!$this->container->has('security.authorization_checker')) {
throw new \LogicException('The SecurityBundle is not registered in your application.');
}
/** @var $dispatcher EventDispatcherInterface */
$dispatcher = $this->get('event_dispatcher');
$event = new PermissionEvent($this, $attributes, $object, $field);
$dispatcher->dispatch(CoreEvents::OJS_PERMISSION_CHECK, $event);
if (!is_null($event->getResult())) {
return $event->getResult();
}
return $this->container->get('security.authorization_checker')->isGranted($attributes, $object, $field);
}