Fix phpstorm inspection issues
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
committed by
Julius Härtl
parent
320f2bf5c8
commit
c45bb71084
@@ -115,10 +115,9 @@ class PermissionService {
|
||||
*/
|
||||
public function checkPermission($mapper, $id, $permission) {
|
||||
try {
|
||||
$boardId = $id;
|
||||
if ($mapper instanceof IPermissionMapper) {
|
||||
$boardId = $mapper->findBoardId($id);
|
||||
} else {
|
||||
$boardId = $id;
|
||||
}
|
||||
if ($boardId === null) {
|
||||
// Throw NoPermission to not leak information about existing entries
|
||||
@@ -146,13 +145,11 @@ class PermissionService {
|
||||
/**
|
||||
* @param $boardId
|
||||
* @return bool
|
||||
* @throws \OCP\AppFramework\Db\DoesNotExistException
|
||||
*/
|
||||
public function userIsBoardOwner($boardId) {
|
||||
$board = $this->boardMapper->find($boardId);
|
||||
if ($board && $this->userId === $board->getOwner()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return $board && $this->userId === $board->getOwner();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user