diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-11-16 15:31:08 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-11-16 15:31:23 +0300 |
commit | a9765fb47fbbd1e1070434fc06cc76b25a42caa6 (patch) | |
tree | 30ffc7e93c5721c6ac7743daf6f705a4566efa98 /lib/gitlab/auth | |
parent | 721478123068c6718ec73c72a7b7d32c00c816df (diff) |
Introduce has_access_to? so that we could reuse it
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7383#note_18439108
Diffstat (limited to 'lib/gitlab/auth')
-rw-r--r-- | lib/gitlab/auth/result.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/gitlab/auth/result.rb b/lib/gitlab/auth/result.rb index 6be7f690676..39b86c61a18 100644 --- a/lib/gitlab/auth/result.rb +++ b/lib/gitlab/auth/result.rb @@ -9,8 +9,7 @@ module Gitlab def lfs_deploy_token?(for_project) type == :lfs_deploy_token && - actor && - actor.projects.include?(for_project) + actor.try(:has_access_to?, for_project) end def success? |