Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2014-10-24 20:24:49 +0400
committerValery Sizov <valery@gitlab.com>2014-10-24 20:39:14 +0400
commit7f97a1277de78bcd86d68978e9ec29a2548fc144 (patch)
tree069c947e915f60dbc4148a4d972a5ee4aeb7e2e2 /app/finders
parent9712fbcdd366c173e2ec277a617a4e690f6a86e9 (diff)
internal snippets: fix exposing of title
Diffstat (limited to 'app/finders')
-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 b29ab6cf40b..4b0c69f2d2f 100644
--- a/app/finders/snippets_finder.rb
+++ b/app/finders/snippets_finder.rb
@@ -29,6 +29,8 @@ class SnippetsFinder
def by_user(current_user, user, scope)
snippets = user.snippets.fresh.non_expired
+ return snippets.are_public unless current_user
+
if user == current_user
case scope
when 'are_internal' then