diff options
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 5fdd4551982..fb3c190a637 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -118,7 +118,7 @@ class Snippet < ApplicationRecord def self.only_include_projects_visible_to(current_user = nil) levels = Gitlab::VisibilityLevel.levels_for_user(current_user) - joins(:project).where('projects.visibility_level IN (?)', levels) + joins(:project).where(projects: { visibility_level: levels }) end def self.only_include_projects_with_snippets_enabled(include_private: false) |