summaryrefslogtreecommitdiff
path: root/app/finders/snippets_finder.rb
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-03-05 16:12:27 +0000
committerNick Thomas <nick@gitlab.com>2019-03-06 09:05:03 +0000
commite05a86cecdf52a0ec1f0f4ce4f30287f881b8ea2 (patch)
treebf11e94a8cd21c43affadcd8fd00f9f5d23d0d6e /app/finders/snippets_finder.rb
parent42d3117f9c3371e07e8b0aafab6f504e87251c2a (diff)
downloadgitlab-ce-e05a86cecdf52a0ec1f0f4ce4f30287f881b8ea2.tar.gz
Allow all personal snippets to be accessed by API
Previously, you could only access personal snippets in the API if you had authored them. The documentation doesn't state that this is the case, and it's quite surprising.
Diffstat (limited to 'app/finders/snippets_finder.rb')
-rw-r--r--app/finders/snippets_finder.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/finders/snippets_finder.rb b/app/finders/snippets_finder.rb
index d3774746cb8..bf29f15642d 100644
--- a/app/finders/snippets_finder.rb
+++ b/app/finders/snippets_finder.rb
@@ -69,6 +69,8 @@ class SnippetsFinder < UnionFinder
base.with_optional_visibility(visibility_from_scope).fresh
end
+ private
+
# Produces a query that retrieves snippets from multiple projects.
#
# The resulting query will, depending on the user's permissions, include the