summaryrefslogtreecommitdiff
path: root/app/views/projects/snippets
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-02-06 12:17:26 +0000
committerSean McGivern <sean@gitlab.com>2017-02-06 12:17:26 +0000
commita08bbcbc4417baf0316e77501b44e5db6d75fe9a (patch)
tree7a0cdcc765d1d0ffdcd3aedf541621b784b8036d /app/views/projects/snippets
parent572fb0be9b1d45437b7c0ed1000399657f471ec7 (diff)
downloadgitlab-ce-a08bbcbc4417baf0316e77501b44e5db6d75fe9a.tar.gz
Don't render snippet actions for logged-out userssnippet-spam-fix
Diffstat (limited to 'app/views/projects/snippets')
-rw-r--r--app/views/projects/snippets/_actions.html.haml2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/views/projects/snippets/_actions.html.haml b/app/views/projects/snippets/_actions.html.haml
index e2a5107a883..dde2e2b644d 100644
--- a/app/views/projects/snippets/_actions.html.haml
+++ b/app/views/projects/snippets/_actions.html.haml
@@ -1,3 +1,5 @@
+- return unless current_user
+
.hidden-xs
- if can?(current_user, :update_project_snippet, @snippet)
= link_to edit_namespace_project_snippet_path(@project.namespace, @project, @snippet), class: "btn btn-grouped" do