diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-09-20 10:24:47 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-09-20 11:03:10 +0200 |
commit | 795acf2e4e01f7ddf3a8be73ddc119b4d84a03e3 (patch) | |
tree | 1734323e1a55b7be520e79d7e1f40acaad438456 /app/controllers/projects/git_http_client_controller.rb | |
parent | 242e77e070c25fd45896bdd7be6edac4679ec2b2 (diff) | |
download | gitlab-ce-795acf2e4e01f7ddf3a8be73ddc119b4d84a03e3.tar.gz |
Move logic to check ci? or lfs_deploy_token? to Gitlab::Auth::Result
Diffstat (limited to 'app/controllers/projects/git_http_client_controller.rb')
-rw-r--r-- | app/controllers/projects/git_http_client_controller.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/controllers/projects/git_http_client_controller.rb b/app/controllers/projects/git_http_client_controller.rb index ee9ea4bc8b2..cbfd3cab3dd 100644 --- a/app/controllers/projects/git_http_client_controller.rb +++ b/app/controllers/projects/git_http_client_controller.rb @@ -127,15 +127,11 @@ class Projects::GitHttpClientController < Projects::ApplicationController end def ci? - authentication_result.ci? && - authentication_project && - authentication_project == project + authentication_result.ci?(project) end - def lfs_deploy_key? - authentication_result.lfs_deploy_token? && - actor && - actor.projects.include?(project) + def lfs_deploy_token? + authentication_result.lfs_deploy_token?(project) end def authentication_has_download_access? |