diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-08-29 13:05:07 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-09-15 12:21:00 -0500 |
commit | cb85cf1f0a7047c485d7b29b2792b8965e270898 (patch) | |
tree | c681b20e379478042e718afa1473af209af126a0 /app/helpers | |
parent | 372be2d2e8fe8d607011aa7e2b2fca99eeea007d (diff) | |
download | gitlab-ce-cb85cf1f0a7047c485d7b29b2792b8965e270898.tar.gz |
Refactor LFS token logic to use a Redis key instead of a DB field, making it a 1 use only token.
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/lfs_helper.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/lfs_helper.rb b/app/helpers/lfs_helper.rb index 0c867fc8741..2f5709a7395 100644 --- a/app/helpers/lfs_helper.rb +++ b/app/helpers/lfs_helper.rb @@ -25,7 +25,11 @@ module LfsHelper def lfs_download_access? return false unless project.lfs_enabled? - project.public? || ci? || lfs_deploy_key? || (user && user.can?(:download_code, project)) + return true if project.public? + return true if ci? + return true if lfs_deploy_key? + + (user && user.can?(:download_code, project)) end def lfs_upload_access? |