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