From 83f1263f8500e5ead4edbe101bc15285ecd2bd40 Mon Sep 17 00:00:00 2001 From: yystopf Date: Fri, 14 Oct 2022 14:52:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E9=A1=B9=E7=9B=AE=E5=88=A4=E6=96=AD=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8dacc7bb9..5714c520b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -709,9 +709,15 @@ class ApplicationController < ActionController::Base # @project = nil if !@project.is_public? # render_forbidden and return else - logger.info "###########:project not found" - @project = nil - render_not_found and return + if @project.present? + logger.info "###########: has project and but can't read project" + @project = nil + render_forbidden and return + else + logger.info "###########:project not found" + @project = nil + render_not_found and return + end end @project end