私密版本库

dev_daiao
daiao 6 years ago
parent 354287282a
commit 2201c2be64

@ -475,7 +475,7 @@ class ShixunsController < ApplicationController
end
# 添加第二仓库
if params[:is_secret_repository]
add_secret_repositoy
add_secret_repository
else
# 如果有仓库,就要删
if @shixun.shixun_secret_repository&.repo_name
@ -1033,7 +1033,7 @@ private
end
# 添加私密仓库
def add_secret_repositoy
def add_secret_repository
# 防止跟tpm版本库重名加了前缀secret
repo_path = repo_namespace(current_user.login, "secret_#{@shixun.identifier}")
GitService.add_repository(repo_path: repo_path)

@ -2,4 +2,4 @@ json.fork_from @fork_from
json.identity User.current.shixun_identity(@shixun)
json.power @power
json.partial! 'shixuns/top', locals: { shixun: @shixun, current_myshixun: @current_myshixun }
json.secret_repositoy @shixun.shixun_secret_repository.present?
json.secret_repository @shixun.shixun_secret_repository.present?

Loading…
Cancel
Save