diff options
author | Sean McGivern <sean@gitlab.com> | 2017-02-01 18:15:59 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-02-02 10:23:51 +0000 |
commit | c63194ce6f952173649d7de4038aa96348e90565 (patch) | |
tree | a9622e1e5ffc86bf35fc9556152cc03cf2841ef5 /app/views/snippets | |
parent | f799585c41d801bc657f992adf3d4b201af927d2 (diff) | |
download | gitlab-ce-c63194ce6f952173649d7de4038aa96348e90565.tar.gz |
Check public snippets for spam
Apply the same spam checks to public snippets (either personal snippets
that are public, or public snippets on public projects) as to issues on
public projects.
Diffstat (limited to 'app/views/snippets')
-rw-r--r-- | app/views/snippets/_actions.html.haml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/views/snippets/_actions.html.haml b/app/views/snippets/_actions.html.haml index 95fc7198104..9a9a3ff9220 100644 --- a/app/views/snippets/_actions.html.haml +++ b/app/views/snippets/_actions.html.haml @@ -8,6 +8,8 @@ - if current_user = link_to new_snippet_path, class: "btn btn-grouped btn-inverted btn-create", title: "New snippet" do New snippet + - if @snippet.submittable_as_spam? && current_user.admin? + = link_to 'Submit as spam', mark_as_spam_snippet_path(@snippet), method: :post, class: 'btn btn-grouped btn-spam', title: 'Submit as spam' - if current_user .visible-xs-block.dropdown %button.btn.btn-default.btn-block.append-bottom-0.prepend-top-5{ data: { toggle: "dropdown" } } @@ -26,3 +28,6 @@ %li = link_to edit_snippet_path(@snippet) do Edit + - if @snippet.submittable_as_spam? && current_user.admin? + %li + = link_to 'Submit as spam', mark_as_spam_snippet_path(@snippet), method: :post |