summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-02 15:24:59 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-02 15:24:59 -0800
commit7faae7c16353a5d9a7e6f5deaafd894e542d16ee (patch)
tree311d5fc38260a613ef84fabb022d29e433f0f3e9 /app/finders
parenteb865c43d00b9c11beb6914c67878f04bb622b45 (diff)
parentd37cf2a23da0fcbaca695092822e9cd2af4b1bdb (diff)
downloadgitlab-ce-7faae7c16353a5d9a7e6f5deaafd894e542d16ee.tar.gz
Merge pull request #8092 from cirosantilli/factor-finder-perms
Factor permission check in issuable finder
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/issuable_finder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index e1477510065..088a766ed3a 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -44,7 +44,7 @@ class IssuableFinder
table_name = klass.table_name
if project
- if project.public? || (current_user && current_user.can?(:read_project, project))
+ if Ability.abilities.allowed?(current_user, :read_project, project)
project.send(table_name)
else
[]