From d86cf7b43754705546436fa4d656f41164ca781d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Sun, 9 Mar 2025 18:51:49 +0100 Subject: [PATCH] Fix 5xx error on authroization --- app/controllers/general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 2ce8f96dab..b470ac04ae 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -202,7 +202,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw $membershipExists = false; $project = Authorization::skip(fn () => $dbForPlatform->getDocument('projects', $projectId)); - if (!$project->isEmpty()) { + if (!$project->isEmpty() && isset($user)) { $teamId = $project->getAttribute('teamId', ''); $membership = $user->find('teamId', $teamId, 'memberships'); if (!empty($membership)) {