only read + cleanup

This commit is contained in:
Hemachandar
2026-02-10 13:02:15 +05:30
parent 36c46c31d8
commit 8326637ddf
2 changed files with 1 additions and 8 deletions
+1 -6
View File
@@ -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)) {
@@ -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',