diff --git a/.env b/.env index 4d7c038a6b..6dc3e345d2 100644 --- a/.env +++ b/.env @@ -3,6 +3,7 @@ _APP_EDITION=self-hosted _APP_LOCALE=en _APP_WORKER_PER_CORE=6 _APP_COMPRESSION_MIN_SIZE_BYTES=1024 +_APP_CONSOLE_EMAIL_VERIFICATION=false _APP_CONSOLE_WHITELIST_ROOT=disabled _APP_CONSOLE_WHITELIST_EMAILS= _APP_CONSOLE_SESSION_ALERTS=enabled diff --git a/app/controllers/api/console.php b/app/controllers/api/console.php index ec68f1050c..be7b61f70c 100644 --- a/app/controllers/api/console.php +++ b/app/controllers/api/console.php @@ -84,6 +84,7 @@ App::get('/v1/console/variables') '_APP_DOMAIN_FUNCTIONS' => System::getEnv('_APP_DOMAIN_FUNCTIONS'), '_APP_OPTIONS_FORCE_HTTPS' => System::getEnv('_APP_OPTIONS_FORCE_HTTPS'), '_APP_DOMAINS_NAMESERVERS' => System::getEnv('_APP_DOMAINS_NAMESERVERS'), + '_APP_CONSOLE_EMAIL_VERIFICATION' => System::getEnv('_APP_CONSOLE_EMAIL_VERIFICATION', false), ]); $response->dynamic($variables, Response::MODEL_CONSOLE_VARIABLES); diff --git a/docker-compose.yml b/docker-compose.yml index c340733cc2..695837b8af 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -108,6 +108,7 @@ services: - _APP_CONSOLE_SESSION_ALERTS - _APP_CONSOLE_WHITELIST_IPS - _APP_CONSOLE_HOSTNAMES + - _APP_CONSOLE_EMAIL_VERIFICATION - _APP_SYSTEM_EMAIL_NAME - _APP_SYSTEM_EMAIL_ADDRESS - _APP_SYSTEM_TEAM_EMAIL diff --git a/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php b/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php index 4451769384..03483eebbd 100644 --- a/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php +++ b/src/Appwrite/Utopia/Response/Model/ConsoleVariables.php @@ -105,7 +105,17 @@ class ConsoleVariables extends Model 'default' => '', 'example' => 'ns1.example.com,ns2.example.com', ] - ); + ) + ->addRule( + '_APP_CONSOLE_EMAIL_VERIFICATION', + [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Define if email verification is required to access the project on Console.', + 'default' => false, + 'example' => true, + ] + ) + ; } /**