diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 21:08:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 21:08:22 +0300 |
commit | 123c68a7cf788ace140e57e478a12c5b7ac893ae (patch) | |
tree | b36e565ecd895ee46c1713f3734308cfce0e6ba9 /app/presenters/snippet_presenter.rb | |
parent | 862d225ca0d8eb452e56b8fe5a0109aac796e872 (diff) |
Add latest changes from gitlab-org/gitlab@master
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) |