Skip to content
Snippets Groups Projects
Commit d37cf2a2 authored by Ciro Santilli's avatar Ciro Santilli
Browse files

Factor permission check in issuable finder

parent ac158424
No related branches found
No related tags found
No related merge requests found
Loading
@@ -44,7 +44,7 @@ class IssuableFinder
Loading
@@ -44,7 +44,7 @@ class IssuableFinder
table_name = klass.table_name table_name = klass.table_name
   
if project 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) project.send(table_name)
else else
[] []
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment