| @@ 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 |
|
| @@ 356-364 (lines=9) @@ | ||
| 353 | * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException |
|
| 354 | * @throws BadRequestException |
|
| 355 | */ |
|
| 356 | public function deleteForce($id) { |
|
| 357 | if (is_numeric($id) === false) { |
|
| 358 | throw new BadRequestException('id must be a number'); |
|
| 359 | } |
|
| 360 | ||
| 361 | $this->permissionService->checkPermission($this->boardMapper, $id, Acl::PERMISSION_READ); |
|
| 362 | $board = $this->find($id); |
|
| 363 | return $this->boardMapper->delete($board); |
|
| 364 | } |
|
| 365 | ||
| 366 | /** |
|
| 367 | * @param $id |
|