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

issue_tracker_data.rb « project_services « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b1d67657fe6fa0536bbe3cbb933eb3e192e4b415 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

class IssueTrackerData < ApplicationRecord
  belongs_to :service

  delegate :activated?, to: :service, allow_nil: true

  validates :service, presence: true

  def self.encryption_options
    {
      key: Settings.attr_encrypted_db_key_base_32,
      encode: true,
      mode: :per_attribute_iv,
      algorithm: 'aes-256-gcm'
    }
  end

  attr_encrypted :project_url, encryption_options
  attr_encrypted :issues_url, encryption_options
  attr_encrypted :new_issue_url, encryption_options
end