This commit is contained in:
fogelito
2026-01-12 12:43:53 +02:00
parent dacc6a97d0
commit 8758e2e5a0
2 changed files with 4 additions and 10 deletions
@@ -89,13 +89,6 @@ class Base extends Types
]);
$this->collection->setAttribute('attributes', $attr, Document::SET_TYPE_APPEND);
if (in_array($attribute['$id'], $allowedAttributes)) {
/**
* todo find a way to Filter only allowed attribute, while selecting is ok
*/
//$this->collection->setAttribute('attributes', $attr, Document::SET_TYPE_APPEND);
}
}
$internalAttributes = [
@@ -122,7 +115,8 @@ class Base extends Types
];
foreach ($internalAttributes as $attribute) {
//$this->collection->setAttribute('attributes', $attribute, Document::SET_TYPE_APPEND);
$this->collection->setAttribute('attributes', $attribute, Document::SET_TYPE_APPEND);
$allowedAttributes[] = $attribute['key'];
}
if ($this->isSelectQueryAllowed()) {
@@ -28,14 +28,14 @@ class Types extends Validator
protected ?QueryContext $context = null;
/**
* @param string[] $allowedAttributes
* @param array<string> $allowedAttributes
*/
protected array $allowedAttributes;
/**
* @param array $types
* @param QueryContext|null $context
* @param array $allowedAttributes
* @param array<string> $allowedAttributes
*/
public function __construct(array $types = [], ?QueryContext $context = null, array $allowedAttributes = [])
{