提交 7faae7c1 编写于 作者: D Dmitriy Zaporozhets

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

Factor permission check in issuable finder
......@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册