debian-mirror-gitlab/app/models/vulnerability.rb

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

32 lines
623 B
Ruby
Raw Normal View History

2020-11-24 15:15:51 +05:30
# frozen_string_literal: true
# Placeholder class for model that is implemented in EE
class Vulnerability < ApplicationRecord
2022-04-04 11:22:00 +05:30
include EachBatch
2021-01-29 00:20:46 +05:30
include IgnorableColumns
2022-06-21 17:19:12 +05:30
alias_attribute :vulnerability_id, :id
2023-06-20 00:43:36 +05:30
scope :with_projects, -> { includes(:project) }
2023-07-09 08:55:56 +05:30
# Policy class inferring logic is causing performance
# issues therefore we need to explicitly set it.
def self.declarative_policy_class
:VulnerabilityPolicy
end
2021-01-29 00:20:46 +05:30
def self.link_reference_pattern
nil
end
def self.reference_prefix
'[vulnerability:'
end
def self.reference_postfix
']'
end
2020-11-24 15:15:51 +05:30
end
2021-06-08 01:23:25 +05:30
Vulnerability.prepend_mod