Updated getEnv to use system lib

This commit is contained in:
Eldad Fux
2024-04-01 13:02:47 +02:00
parent ffbf3c0058
commit 8ed1da4ea8
60 changed files with 464 additions and 437 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ use Utopia\App;
use Utopia\Database\DateTime;
use Utopia\Database\Document;
use Utopia\Database\Validator\Authorization;
use Utopia\System\System;
App::init()
->groups(['mfaProtected'])
@@ -35,7 +36,7 @@ App::init()
->inject('project')
->inject('geodb')
->action(function (App $utopia, Request $request, Document $project, Reader $geodb) {
$denylist = App::getEnv('_APP_CONSOLE_COUNTRIES_DENYLIST', '');
$denylist = System::getEnv('_APP_CONSOLE_COUNTRIES_DENYLIST', '');
if (!empty($denylist && $project->getId() === 'console')) {
$countries = explode(',', $denylist);
$record = $geodb->get($request->getIP()) ?? [];