public function checkPermissions($projectId)
 {
     $userId = Authorizer::getResourceOwnerId();
     if (!$this->repository->isOwner($projectId, $userId) and !$this->repository->hasMember($projectId, $userId)) {
         throw new \Exception('Access Forbiden');
     }
     return true;
 }
 public function hasMember($projectId)
 {
     return $this->project->hasMember($projectId, Authorizer::getResourceOwnerId());
 }