新增:fork仓库不支持代码溯源

This commit is contained in:
yystopf 2022-08-08 14:17:45 +08:00
parent e7aa05b535
commit 0699c768a5
1 changed files with 5 additions and 0 deletions

View File

@ -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