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

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

module Integrations
  class ZentaoTrackerData < ApplicationRecord
    belongs_to :integration, inverse_of: :zentao_tracker_data, foreign_key: :integration_id
    delegate :activated?, to: :integration
    validates :integration, presence: true

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

    attr_encrypted :url, encryption_options
    attr_encrypted :api_url, encryption_options
    attr_encrypted :zentao_product_xid, encryption_options
    attr_encrypted :api_token, encryption_options
  end
end