summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Baum <ibaum@gitlab.com>2018-03-07 20:01:42 +0000
committerIan Baum <ibaum@gitlab.com>2018-03-07 20:01:42 +0000
commit517b9705f533ae34a883a616bf6fe03e748e9dfc (patch)
tree220802a53a187e30e080abea5361aaf018ecdf68
parent790bcf704bfda33942ee616764b5741ae1cb2e9e (diff)
parentecf1af65ef617c50fe28205840a4cdb5efec32e8 (diff)
downloadgitlab-ce-517b9705f533ae34a883a616bf6fe03e748e9dfc.tar.gz
Merge branch '42877-for-10-5-stable-patch-4' into '10-5-stable-patch-4'
Fix snippets problem in 10-5-stable-patch-4 See merge request gitlab-org/gitlab-ce!17610
-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)