From cf830affc9a5076b3f808ef65dd64191a66e050e Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 12 Jun 2025 12:20:21 -0400 Subject: [PATCH] Check not development for plan error --- app/controllers/api/databases.php | 2 +- tests/e2e/Services/Databases/DatabasesCustomServerTest.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 1cd7cd0ebd..0e85171772 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -1351,7 +1351,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string ->inject('queueForEvents') ->inject('plan') ->action(function (string $databaseId, string $collectionId, string $key, ?int $size, ?bool $required, ?string $default, bool $array, bool $encrypt, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents, array $plan) { - if ($encrypt && !empty($plan) && !($plan['databasesAllowEncrypt'] ?? false)) { + if (!App::isDevelopment() && $encrypt && !empty($plan) && !($plan['databasesAllowEncrypt'] ?? false)) { throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Encrypted string attributes are not available on your plan. Please upgrade to create encrypted string attributes.'); } if ($encrypt && $size < APP_DATABASE_ENCRYPT_SIZE_MIN) { diff --git a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php index 993624a1fe..e84c760c86 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php @@ -641,7 +641,6 @@ class DatabasesCustomServerTest extends Scope /** * @depends testListCollections - * @group cl-ignore */ public function testCreateEncryptedAttribute(array $data): void {