/** * {@inheritdoc} */ public function isGranted($action, $object) { if (!$this->parameterResolver->resolveVoter()) { return true; } return $this->authorizationChecker->isGranted('lug.' . $action, $object); }
/** * {@inheritdoc} */ public function resolveVoter() { return !isset($this->cache[$key = 'voter']) ? $this->cache[$key] = $this->parameterResolver->resolveVoter() : $this->cache[$key]; }