mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Check not development for plan error
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -641,7 +641,6 @@ class DatabasesCustomServerTest extends Scope
|
||||
|
||||
/**
|
||||
* @depends testListCollections
|
||||
* @group cl-ignore
|
||||
*/
|
||||
public function testCreateEncryptedAttribute(array $data): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user