summaryrefslogtreecommitdiff
path: root/app/controllers/projects/git_http_controller.rb
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-01-27 19:33:58 -0600
committerMike Greiling <mike@pixelcog.com>2017-01-27 19:33:58 -0600
commit69e4072f89ad9aeebcc852373341f790c1b021e2 (patch)
treec68ad1ee38efe48707e8ea467db3e2759f1a88c0 /app/controllers/projects/git_http_controller.rb
parentc5b7cc54e9bfceda7d48b1f15bcf064a0d96c07d (diff)
parent6ccc4eb42a05d4ce8b75773723305bd82305dfec (diff)
downloadgitlab-ce-69e4072f89ad9aeebcc852373341f790c1b021e2.tar.gz
Merge branch 'master' into go-go-gadget-webpack
* master: (389 commits) Document "No gems fetched from git repositories" policy [ci skip] Typos Small gramatical tweaks Typos Added PHP & NPM doc Use `:empty_project` where possible in request specs Add caching of droplab ajax requests Use `:empty_project` where possible in model specs Revert 3f17f29a Remove unused js response from refs controller Add MR id to changelog entry fixed small mini pipeline graph line glitch Prevent form to be submitted twice Fix Error 500 when repositories contain annotated tags pointing to blobs Fix /explore sorting (trending) Simplify wording in "adding an image" docs Remove "official merge window" from CONTRIBUTING.md [ci skip] Update repository check documentation Fixed flexbox and wrap issues Update two_factor_authentication.md ...
Diffstat (limited to 'app/controllers/projects/git_http_controller.rb')
-rw-r--r--app/controllers/projects/git_http_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/projects/git_http_controller.rb b/app/controllers/projects/git_http_controller.rb
index 9184dcccac5..278098fcc58 100644
--- a/app/controllers/projects/git_http_controller.rb
+++ b/app/controllers/projects/git_http_controller.rb
@@ -84,7 +84,7 @@ class Projects::GitHttpController < Projects::GitHttpClientController
end
def access
- @access ||= Gitlab::GitAccess.new(user, project, 'http', authentication_abilities: authentication_abilities)
+ @access ||= access_klass.new(user, project, 'http', authentication_abilities: authentication_abilities)
end
def access_check
@@ -102,4 +102,8 @@ class Projects::GitHttpController < Projects::GitHttpClientController
access_check.allowed?
end
+
+ def access_klass
+ @access_klass ||= wiki? ? Gitlab::GitAccessWiki : Gitlab::GitAccess
+ end
end