summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-08-30 18:43:24 -0500
committerPatricio Cano <suprnova32@gmail.com>2016-09-15 12:21:00 -0500
commitc25630ee2c2804e351a2c3ae4fd9224434e4698a (patch)
tree7d183ef29da41a3c3b53790a2fc48402d1f4f397 /app
parent48f1a61fd5c6aac395be0ce5d59aee61bbb69fe9 (diff)
downloadgitlab-ce-c25630ee2c2804e351a2c3ae4fd9224434e4698a.tar.gz
Refactored handling of the `LfsToken` and added functionality to it to simplify external code.
Diffstat (limited to 'app')
-rw-r--r--app/helpers/lfs_helper.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/helpers/lfs_helper.rb b/app/helpers/lfs_helper.rb
index 2f5709a7395..031e7e72909 100644
--- a/app/helpers/lfs_helper.rb
+++ b/app/helpers/lfs_helper.rb
@@ -25,9 +25,7 @@ module LfsHelper
def lfs_download_access?
return false unless project.lfs_enabled?
- return true if project.public?
- return true if ci?
- return true if lfs_deploy_key?
+ return true if project.public? || ci? || lfs_deploy_key?
(user && user.can?(:download_code, project))
end