/**
  * @param string $attribute
  * @param SessionDescriptionInterface $description
  * @param TokenInterface $token
  * @return bool
  */
 protected function voteOnAttribute($attribute, $description, TokenInterface $token)
 {
     $session = $description->getSession();
     if (!$session) {
         return false;
     }
     // grant perms based on the owning session
     return parent::voteOnAttribute($attribute, $session, $token);
 }
Beispiel #2
0
 /**
  * @param SessionDescriptionInterface $sessionDescription
  */
 public function setSessionDescription(SessionDescriptionInterface $sessionDescription)
 {
     $this->sessionDescription = $sessionDescription;
     $sessionDescription->setSession($this);
 }
 /**
  * @param string $attribute
  * @param SessionDescriptionInterface $description
  * @param UserInterface|null $user
  * @return bool
  */
 protected function isGranted($attribute, $description, $user = null)
 {
     // grant perms based on the owning session
     return parent::isGranted($attribute, $description->getSession(), $user);
 }