diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-10-19 10:02:13 +0200 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2015-01-01 21:11:38 +0100 |
commit | d37cf2a23da0fcbaca695092822e9cd2af4b1bdb (patch) | |
tree | 6c26dc5ba71bcd8c8ace1ff7823e2b1f825c3f92 /app/finders/issuable_finder.rb | |
parent | ac1584249c262e447a6360734597fa17fe077718 (diff) | |
download | gitlab-ce-d37cf2a23da0fcbaca695092822e9cd2af4b1bdb.tar.gz |
Factor permission check in issuable finder
Diffstat (limited to 'app/finders/issuable_finder.rb')
-rw-r--r-- | app/finders/issuable_finder.rb | 2 |
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 [] |