Merge branch 'use_gollum_wikis' of https://github.com/DanKnox/gitlabhq into DanKnox-use_gollum_wikis

Conflicts:
	app/views/layouts/project_resource.html.haml
	app/views/wikis/edit.html.haml
	app/views/wikis/pages.html.haml
	app/views/wikis/show.html.haml
	spec/features/gitlab_flavored_markdown_spec.rb
This commit is contained in:
Dmitriy Zaporozhets 2013-03-15 16:55:07 +02:00
commit 71ab011a17
30 changed files with 1252 additions and 86 deletions

View file

@ -12,10 +12,18 @@ module Gitlab
# ref - branch name
#
get "/allowed" do
# Check for *.wiki repositories.
# Strip out the .wiki from the pathname before finding the
# project. This applies the correct project permissions to
# the wiki repository as well.
project_path = params[:project]
project_path.gsub!(/\.wiki/,'') if project_path =~ /\.wiki/
key = Key.find(params[:key_id])
project = Project.find_with_namespace(params[:project])
project = Project.find_with_namespace(project_path)
git_cmd = params[:action]
if key.is_deploy_key
project == key.project && git_cmd == 'git-upload-pack'
else