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:
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r--app/models/snippet.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index 00931457344..f85f53cae48 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -14,6 +14,7 @@ class Snippet < ApplicationRecord
include Editable
include Gitlab::SQL::Pattern
include FromUnion
+ extend ::Gitlab::Utils::Override
cache_markdown_field :title, pipeline: :single_line
cache_markdown_field :description
@@ -190,6 +191,12 @@ class Snippet < ApplicationRecord
(public? && (title_changed? || content_changed?))
end
+ # snippers are the biggest sources of spam
+ override :allow_possible_spam?
+ def allow_possible_spam?
+ false
+ end
+
def spammable_entity_type
'snippet'
end