Return only an owned report with an owned internal dataset. */
(int $reportId)
| 171 | |
| 172 | /** Return only an owned report with an owned internal dataset. */ |
| 173 | public function readOwnDatasetReport(int $reportId): array { |
| 174 | $report = $this->ReportMapper->readOwn($reportId); |
| 175 | if (empty($report) || (int)$report['type'] !== DatasourceController::DATASET_TYPE_INTERNAL_DB |
| 176 | || (int)$report['dataset'] <= 0 |
| 177 | || empty($this->DatasetService->readOwn((int)$report['dataset']))) { |
| 178 | return []; |
| 179 | } |
| 180 | return $report; |
| 181 | } |
| 182 | |
| 183 | /** |
| 184 | * check if own report |