gitlab-org--gitlab-foss/app/services/spam/spam_constants.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
674 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Spam
module SpamConstants
ERROR_TYPE = 'spamcheck'
BLOCK_USER = 'block'
DISALLOW = 'disallow'
CONDITIONAL_ALLOW = 'conditional_allow'
OVERRIDE_VIA_ALLOW_POSSIBLE_SPAM = 'override_via_allow_possible_spam'
ALLOW = 'allow'
NOOP = 'noop'
SUPPORTED_VERDICTS = {
BLOCK_USER => {
priority: 1
},
DISALLOW => {
priority: 2
},
CONDITIONAL_ALLOW => {
priority: 3
},
OVERRIDE_VIA_ALLOW_POSSIBLE_SPAM => {
priority: 4
},
ALLOW => {
priority: 5
},
NOOP => {
priority: 6
}
}.freeze
end
end