Skip to content

Commit

Permalink
REST API erweitert um „*“ bei Feldern für die Freigabe von allen Feldern
Browse files Browse the repository at this point in the history
  • Loading branch information
dergel committed Nov 11, 2023
1 parent f6b9e4a commit dfee9a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/rest/lib/rest/route.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,10 @@ public function getFields(string $type = 'get', $instance = null): array

foreach ($availableFields as $key => $availableField) {
if ('none' != $availableField->getDatabaseFieldType()) {
// ALLE Felder erlaubt wenn kein Feld gesetzt ? count($this->config[$type]['fields'][$class]) == 0 ||
if (isset($this->config[$type]['fields'][$class]) && in_array($key, @$this->config[$type]['fields'][$class], true)) {
$returnFields[$key] = $availableField;
} elseif (1 == count($this->config[$type]['fields'][$class]) && '*' == $this->config[$type]['fields'][$class][0]) {
$returnFields[$key] = $availableField;
}
}
}
Expand Down

0 comments on commit dfee9a7

Please sign in to comment.