Ejemplo n.º 1
0
 public function assert(Rbac $rbac)
 {
     if (!$this->user || !$this->visitor) {
         return false;
     }
     $friendship = \User\Model\Friend::checkFriendship($this->user['id'], $this->visitor['id']);
     return $friendship && $friendship['relationshipStatus'] == 'blocked' ? false : true;
 }
Ejemplo n.º 2
0
 public function assert(Rbac $rbac)
 {
     if (!$this->user || !$this->visitor) {
         return false;
     }
     //My friend should including me
     if ($this->user['id'] == $this->visitor['id']) {
         return true;
     }
     $friendship = \User\Model\Friend::checkFriendship($this->user['id'], $this->visitor['id']);
     return $friendship && $friendship['relationshipStatus'] == 'approved' ? true : false;
 }