add user auth only to hidden projects
This commit is contained in:
parent
12b8b4c612
commit
e658f8765e
|
@ -120,7 +120,8 @@ class Project < ActiveRecord::Base
|
|||
def git_project_address auth_user
|
||||
host ||= EventLog.current_controller.request.host_with_port rescue ::Rosa::Application.config.action_mailer.default_url_options[:host]
|
||||
protocol = APP_CONFIG['mailer_https_url'] ? "https" : "http" rescue "http"
|
||||
opts = {:host => host, :protocol => protocol, :user => auth_user.authentication_token, :password => ''}
|
||||
opts = {:host => host, :protocol => protocol}
|
||||
opts.merge!({:user => auth_user.authentication_token, :password => ''}) unless self.public?
|
||||
Rails.application.routes.url_helpers.project_url(self.owner.uname, self.name, opts) + ".git"
|
||||
#path #share by NFS
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue