diff options
Diffstat (limited to 'app/presenters/snippet_presenter.rb')
-rw-r--r-- | app/presenters/snippet_presenter.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/presenters/snippet_presenter.rb b/app/presenters/snippet_presenter.rb index 37c9ebd3305..a453be18b95 100644 --- a/app/presenters/snippet_presenter.rb +++ b/app/presenters/snippet_presenter.rb @@ -23,6 +23,10 @@ class SnippetPresenter < Gitlab::View::Presenter::Delegated can_access_resource?("admin") end + def can_report_as_spam? + snippet.submittable_as_spam_by?(current_user) + end + private def can_access_resource?(ability_prefix) |