Ojs\CoreBundle\Controller\OjsController::isGranted PHP Метод

isGranted() защищенный Метод

Checks if the attributes are granted against the current authentication token and optionally supplied object.
protected isGranted ( mixed $attributes, mixed $object = null, $field = null ) : boolean
$attributes mixed The attributes
$object mixed The object
$field
Результат boolean
    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);
    }