From 2be59a94da50aebff8a154d866f01e3755731989 Mon Sep 17 00:00:00 2001 From: shimon Date: Wed, 19 Mar 2025 11:13:30 +0200 Subject: [PATCH] update --- app/init/resources.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/init/resources.php b/app/init/resources.php index 9b6664a818..980c9f264a 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -285,17 +285,6 @@ App::setResource('project', function ($dbForPlatform, $request, $console, $utopi $project = Authorization::skip(fn () => $dbForPlatform->getDocument('projects', $projectId)); - if (!empty($project->getAttribute('region')) && $project->getAttribute('region') !== System::getEnv('_APP_REGION', 'default')) { - var_dump([ - 'projectId' => $project->getId(), - 'projectRegion' => $project->getAttribute('region'), - 'params' => 'Method: ' . $route->getMethod(). 'URL: ' . $route->getPath(), - '_APP_REGION' => System::getEnv('_APP_REGION'), - ]); - - throw new Exception(Exception::GENERAL_ACCESS_FORBIDDEN, 'Project is not accessible in this region. Please make sure you are using the correct endpoint'); - } - return $project; }, ['dbForPlatform', 'request', 'console', 'utopia']);