diff --git a/app/controllers/general.php b/app/controllers/general.php index 11fabe7550..13a86ac36b 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -167,7 +167,7 @@ function router(App $utopia, Database $dbForConsole, callable $getProjectDB, Swo $permissions = $function->getAttribute('execute'); - if (!(\in_array('any', $permissions)) && (\in_array('guests', $permissions))) { + if (!(\in_array('any', $permissions)) && !(\in_array('guests', $permissions))) { throw new AppwriteException(AppwriteException::USER_UNAUTHORIZED, 'To execute function using domain, execute permissions must include "any" or "guests"'); }