Welcome to mirror list, hosted at ThFree Co, Russian Federation.

spam_constants.rb « spam « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d300525710cd87a011f0c77d5fd2bbfc7aa10975 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# frozen_string_literal: true

module Spam
  module SpamConstants
    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