Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-10-19 12:02:13 +0400
committerCiro Santilli <ciro.santilli@gmail.com>2015-01-01 23:11:38 +0300
commitd37cf2a23da0fcbaca695092822e9cd2af4b1bdb (patch)
tree6c26dc5ba71bcd8c8ace1ff7823e2b1f825c3f92 /app/finders
parentac1584249c262e447a6360734597fa17fe077718 (diff)
Factor permission check in issuable finder
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/issuable_finder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index e1477510065..088a766ed3a 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -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
[]