Commit 7faae7c1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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

Factor permission check in issuable finder
parents eb865c43 d37cf2a2
......@@ -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
[]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment