Factor permission check in issuable finder
This commit is contained in:
parent
ac1584249c
commit
d37cf2a23d
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
[]
|
||||
|
|
Loading…
Reference in a new issue