Created index tests for StackApiTestController

Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
This commit is contained in:
Ryan Fletcher
2018-07-15 15:35:48 -04:00
committed by Julius Härtl
parent 54f110f7c6
commit 891fa7b7d5
5 changed files with 125 additions and 42 deletions

View File

@@ -146,11 +146,11 @@ class PermissionService {
public function userIsBoardOwner($boardId) {
try {
$board = $this->boardMapper->find($boardId);
return $board && $this->userId === $board->getOwner();
} catch (DoesNotExistException $e) {
} catch (MultipleObjectsReturnedException $e) {
return false;
}
return $board && $this->userId === $board->getOwner();
}
}
/**