* update report group assignment (from drag & drop) * * @NoAdminRequired * @param int $reportId * @param $groupId * @return bool */
(int $reportId, $groupId)
| 586 | * @return bool |
| 587 | */ |
| 588 | public function updateGroup(int $reportId, $groupId) { |
| 589 | $groupId = (int)$groupId; |
| 590 | if (!$this->isOwn($reportId) || !$this->isValidParent($groupId, $reportId)) { |
| 591 | return false; |
| 592 | } |
| 593 | return $this->ReportMapper->updateGroup($reportId, $groupId); |
| 594 | } |
| 595 | |
| 596 | private function isValidParent(int $parentId, ?int $itemId = null): bool { |
| 597 | if ($parentId === 0) { |
no test coverage detected