From 8326637ddf75f9810a6cbef450e1e0bac3bf3b34 Mon Sep 17 00:00:00 2001 From: Hemachandar Date: Tue, 10 Feb 2026 13:02:15 +0530 Subject: [PATCH] only read + cleanup --- app/controllers/shared/api.php | 7 +------ tests/e2e/Services/Projects/ProjectsConsoleClientTest.php | 2 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 167e41d91e..f4115c5308 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -297,12 +297,7 @@ Http::init() * whether the admin user has necessary permission on the project (sites, functions, etc. don't have permissions associated to them). */ if ($project->getId() !== 'console' && $mode === APP_MODE_ADMIN) { - $action = match ($route->getMethod()) { - Request::METHOD_GET => Database::PERMISSION_READ, - Request::METHOD_DELETE => Database::PERMISSION_DELETE, - default => Database::PERMISSION_UPDATE, - }; - $input = new Input($action, $project->getPermissionsByType($action)); + $input = new Input(Database::PERMISSION_READ, $project->getPermissionsByType(Database::PERMISSION_READ)); $initialStatus = $authorization->getStatus(); $authorization->enable(); if (!$authorization->isValid($input)) { diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 060ab73170..5a3ed68c4d 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -6020,8 +6020,6 @@ class ProjectsConsoleClientTest extends Scope } foreach ($testCase['inaccessibleProjectIds'] as $projectId) { - echo "processing user " . $testCase['userEmail'] . " for project " . $projectId . "\n"; - $variableId = ID::unique(); $response = $this->client->call(Client::METHOD_POST, '/project/variables', [ 'origin' => 'http://localhost',