From bc6a1384fb92609891e77b190d85975aa80a3ce3 Mon Sep 17 00:00:00 2001 From: Dani Donisa Date: Wed, 2 Oct 2024 17:08:44 +0200 Subject: [PATCH] Make deleted parameter to behave properly This way `?deleted=0` and `?` behaves consistently, and only `?deleted=1` activates the behaviour for deleted projects Fixes #16911 --- src/api/app/controllers/source_project_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/app/controllers/source_project_controller.rb b/src/api/app/controllers/source_project_controller.rb index 5eed128a291..e3af41b28ad 100644 --- a/src/api/app/controllers/source_project_controller.rb +++ b/src/api/app/controllers/source_project_controller.rb @@ -4,7 +4,7 @@ class SourceProjectController < SourceController # GET /source/:project def show project_name = params[:project] - if params.key?(:deleted) + if params[:deleted] == '1' unless Project.find_by_name(project_name) || Project.is_remote_project?(project_name) # project is deleted or not accessible validate_visibility_of_deleted_project(project_name)