summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2018-03-07 20:01:40 +0000
committerIan Baum <ibaum@gitlab.com>2018-03-07 20:01:40 +0000
commitecf1af65ef617c50fe28205840a4cdb5efec32e8 (patch)
tree220802a53a187e30e080abea5361aaf018ecdf68
parent790bcf704bfda33942ee616764b5741ae1cb2e9e (diff)
downloadgitlab-ce-ecf1af65ef617c50fe28205840a4cdb5efec32e8.tar.gz
Fix snippets problem in 10-5-stable-patch-4
-rw-r--r--app/finders/snippets_finder.rb3
1 files changed, 0 insertions, 3 deletions
diff --git a/app/finders/snippets_finder.rb b/app/finders/snippets_finder.rb
index 8deef84555e..0048e684c13 100644
--- a/app/finders/snippets_finder.rb
+++ b/app/finders/snippets_finder.rb
@@ -82,9 +82,6 @@ class SnippetsFinder < UnionFinder
end
def feature_available_projects
- # Don't return any project related snippets if the user cannot read cross project
- return table[:id].eq(nil) unless Ability.allowed?(current_user, :read_cross_project)
-
projects = projects_for_user do |part|
part.with_feature_available_for_user(:snippets, current_user)
end.select(:id)