* update report group assignment (from drag & drop) * * @NoAdminRequired * @param int $reportId * @param $groupId * @return bool */
(int $reportId, $groupId)
| 695 | * @return bool |
| 696 | */ |
| 697 | public function updateGroup(int $reportId, $groupId) { |
| 698 | $groupId = (int)$groupId; |
| 699 | if (!$this->isOwn($reportId) || !$this->isValidParent($groupId, $reportId)) { |
| 700 | return false; |
| 701 | } |
| 702 | return $this->ReportMapper->updateGroup($reportId, $groupId); |
| 703 | } |
| 704 | |
| 705 | private function isValidParent(int $parentId, ?int $itemId = null): bool { |
| 706 | if ($parentId === 0) { |
no test coverage detected