2011-03-10 11:35:46 +00:00
|
|
|
module ProjectsHelper
|
2011-11-17 21:57:30 +00:00
|
|
|
def git_repo_url(name, read_only = true)
|
|
|
|
if current_user and !read_only
|
|
|
|
"http://#{current_user.uname}@#{request.host_with_port}/#{name}.git"
|
2011-11-10 09:04:24 +00:00
|
|
|
else
|
2011-11-17 21:57:30 +00:00
|
|
|
"http://#{request.host_with_port}/#{name}.git"
|
2011-11-10 09:04:24 +00:00
|
|
|
end
|
2011-10-26 21:57:51 +01:00
|
|
|
end
|
2011-03-10 11:35:46 +00:00
|
|
|
end
|