summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)