mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-24 13:45:44 +08:00
新增:fork仓库不支持代码溯源
This commit is contained in:
@@ -3,6 +3,7 @@ class Traces::ProjectsController < Traces::BaseController
|
|||||||
|
|
||||||
before_action :require_login
|
before_action :require_login
|
||||||
before_action :load_project
|
before_action :load_project
|
||||||
|
before_action :require_project_not_be_forked_project
|
||||||
before_action :set_trace_token_to_cookie
|
before_action :set_trace_token_to_cookie
|
||||||
before_action :authorizate_user_can_edit_project!, except: [:task_results]
|
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]
|
:domain => Trace.trace_config[:cookie_domain]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def require_project_not_be_forked_project
|
||||||
|
return render_error('fork仓库暂不支持代码溯源服务,敬请谅解。') if @project.forked_from_project_id.present?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user