| @@ 347-355 (lines=9) @@ | ||
| 344 | * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException |
|
| 345 | * @throws BadRequestException |
|
| 346 | */ |
|
| 347 | public function deleteForce($id) { |
|
| 348 | if (is_numeric($id) === false) { |
|
| 349 | throw new BadRequestException('id must be a number'); |
|
| 350 | } |
|
| 351 | ||
| 352 | $this->permissionService->checkPermission($this->boardMapper, $id, Acl::PERMISSION_READ); |
|
| 353 | $board = $this->find($id); |
|
| 354 | return $this->boardMapper->delete($board); |
|
| 355 | } |
|
| 356 | ||
| 357 | /** |
|
| 358 | * @param $id |
|
| @@ 60-66 (lines=7) @@ | ||
| 57 | * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException |
|
| 58 | * @throws BadRequestException |
|
| 59 | */ |
|
| 60 | public function find($labelId) { |
|
| 61 | if (is_numeric($labelId) === false) { |
|
| 62 | throw new BadRequestException('label id must be a number'); |
|
| 63 | } |
|
| 64 | $this->permissionService->checkPermission($this->labelMapper, $labelId, Acl::PERMISSION_READ); |
|
| 65 | return $this->labelMapper->find($labelId); |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @param $title |
|