Ejemplo n.º 1
0
 /**
  * @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);
 }
Ejemplo n.º 2
0
 /**
  * @param SessionDescriptionInterface $sessionDescription
  */
 public function setSessionDescription(SessionDescriptionInterface $sessionDescription)
 {
     $this->sessionDescription = $sessionDescription;
     $sessionDescription->setSession($this);
 }
Ejemplo n.º 3
0
 /**
  * @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);
 }