* evaluate if the user did filter in the report and if he is allowed to filter (shared reports) * * @param $metadata * @param $filteroptions * @param $dataoptions * @param $chartoptions * @param $tableoptions * @return mixed */
($metadata, $filteroptions, $dataoptions, $chartoptions, $tableoptions)
| 345 | * @return mixed |
| 346 | */ |
| 347 | private function evaluateCanFilter($metadata, $filteroptions, $dataoptions, $chartoptions, $tableoptions) { |
| 348 | // send current user filter options to the data request |
| 349 | // only if the report has update-permissions |
| 350 | // if nothing is changed by the user, the filter which is stored for the report, will be used |
| 351 | if ($filteroptions and $filteroptions !== '' and (int)$metadata['permissions'] === Constants::PERMISSION_UPDATE) { |
| 352 | $metadata['filteroptions'] = $filteroptions; |
| 353 | $metadata['dataoptions'] = $dataoptions; |
| 354 | $metadata['chartoptions'] = $chartoptions; |
| 355 | $metadata['tableoptions'] = $tableoptions; |
| 356 | } |
| 357 | return $metadata; |
| 358 | } |
| 359 | |
| 360 | |
| 361 | /** |
no outgoing calls
no test coverage detected