diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-15 16:55:07 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-15 16:55:07 +0200 |
commit | 71ab011a1711db9a1a9ced2c2c92c8427ae6f624 (patch) | |
tree | 95e38662d7f022061c2c809f4b6c53067a5df468 /lib/api/internal.rb | |
parent | 4f23c30ace844cdcd2c59da1a758c8a6788ca6f3 (diff) | |
parent | d69a37e0b7163f5a03fcc58fdb6ec0ed1eb20862 (diff) | |
download | gitlab-ce-71ab011a1711db9a1a9ced2c2c92c8427ae6f624.tar.gz |
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
Diffstat (limited to 'lib/api/internal.rb')
-rw-r--r-- | lib/api/internal.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb index 22ac49c6be8..81451638090 100644 --- a/lib/api/internal.rb +++ b/lib/api/internal.rb @@ -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 |