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

vulnerability.rb « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 700e4e0e0ecc0dfeba79aa2315c1fd7badad7336 (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
# frozen_string_literal: true

# Placeholder class for model that is implemented in EE
class Vulnerability < ApplicationRecord
  include EachBatch
  include IgnorableColumns

  alias_attribute :vulnerability_id, :id

  scope :with_projects, -> { includes(:project) }

  # Policy class inferring logic is causing performance
  # issues therefore we need to explicitly set it.
  def self.declarative_policy_class
    :VulnerabilityPolicy
  end

  def self.link_reference_pattern
    nil
  end

  def self.reference_prefix
    '[vulnerability:'
  end

  def self.reference_postfix
    ']'
  end
end

Vulnerability.prepend_mod