Merge pull request #8092 from cirosantilli/factor-finder-perms

Factor permission check in issuable finder
This commit is contained in:
Dmitriy Zaporozhets 2015-03-02 15:24:59 -08:00
commit 7faae7c163
1 changed files with 1 additions and 1 deletions

View File

@ -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
[]