Merge pull request #8092 from cirosantilli/factor-finder-perms
Factor permission check in issuable finder
This commit is contained in:
commit
7faae7c163
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