From 0699c768a5404bbe826964cb44867b27a412145f Mon Sep 17 00:00:00 2001 From: yystopf Date: Mon, 8 Aug 2022 14:17:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9Afork=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E4=B8=8D=E6=94=AF=E6=8C=81=E4=BB=A3=E7=A0=81=E6=BA=AF?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/traces/projects_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/traces/projects_controller.rb b/app/controllers/traces/projects_controller.rb index 89a4aac8..74e683f8 100644 --- a/app/controllers/traces/projects_controller.rb +++ b/app/controllers/traces/projects_controller.rb @@ -3,6 +3,7 @@ class Traces::ProjectsController < Traces::BaseController before_action :require_login before_action :load_project + before_action :require_project_not_be_forked_project before_action :set_trace_token_to_cookie before_action :authorizate_user_can_edit_project!, except: [:task_results] @@ -95,4 +96,8 @@ class Traces::ProjectsController < Traces::BaseController :domain => Trace.trace_config[:cookie_domain] } end + + def require_project_not_be_forked_project + return render_error('fork仓库暂不支持代码溯源服务,敬请谅解。') if @project.forked_from_project_id.present? + end end \ No newline at end of file