diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-27 12:09:41 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-27 12:09:41 +0000 |
commit | 45999bfdec535b959f46fa4ed8f761bb3eadfed4 (patch) | |
tree | 12dda4fdec530172f3d21da4cc667dd73c9df133 /app/models/snippet.rb | |
parent | 39fa1b598749be0aad699032bbf31450b3ff0098 (diff) | |
download | gitlab-ce-45999bfdec535b959f46fa4ed8f761bb3eadfed4.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 4791b9db5dd..f3a0bea12dd 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -102,6 +102,10 @@ class Snippet < ApplicationRecord where(project_id: nil) end + def self.only_project_snippets + where.not(project_id: nil) + end + def self.only_include_projects_visible_to(current_user = nil) levels = Gitlab::VisibilityLevel.levels_for_user(current_user) |