From dd25072cdf39e13892267cc87657248430b811d9 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 23 May 2025 09:03:42 +0000 Subject: [PATCH] Merge pull request #9868 from ArnabChatterjee20k/dat-532 added encrypt property in the attribute string response model # Conflicts: # tests/e2e/Services/Databases/DatabasesCustomServerTest.php --- app/init/database/filters.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/app/init/database/filters.php b/app/init/database/filters.php index 73ff7dc221..98a37ec4ad 100644 --- a/app/init/database/filters.php +++ b/app/init/database/filters.php @@ -77,12 +77,21 @@ Database::addFilter( ]); foreach ($attributes as $attribute) { - if ($attribute->getAttribute('type') === Database::VAR_RELATIONSHIP) { - $options = $attribute->getAttribute('options'); - foreach ($options as $key => $value) { - $attribute->setAttribute($key, $value); - } - $attribute->removeAttribute('options'); + $attributeType = $attribute->getAttribute('type'); + + switch ($attributeType) { + case Database::VAR_RELATIONSHIP: + $options = $attribute->getAttribute('options'); + foreach ($options as $key => $value) { + $attribute->setAttribute($key, $value); + } + $attribute->removeAttribute('options'); + break; + + case Database::VAR_STRING: + $filters = $attribute->getAttribute('filters', []); + $attribute->setAttribute('encrypt', in_array('encrypt', $filters)); + break; } }