From be613de2cfa96c7a17f734e532ba6ada0d81c7fe Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Sat, 14 May 2016 11:33:14 +0200 Subject: Project#show on projects pending deletion will 404 fixes #17508 --- app/controllers/projects/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/projects/application_controller.rb') diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb index be872a93fee..776ba92c9ab 100644 --- a/app/controllers/projects/application_controller.rb +++ b/app/controllers/projects/application_controller.rb @@ -26,7 +26,7 @@ class Projects::ApplicationController < ApplicationController project_path = "#{namespace}/#{id}" @project = Project.find_with_namespace(project_path) - if @project && can?(current_user, :read_project, @project) + if can?(current_user, :read_project, @project) && !@project.pending_delete? if @project.path_with_namespace != project_path redirect_to request.original_url.gsub(project_path, @project.path_with_namespace) end -- cgit v1.2.1