debian-mirror-gitlab/app/models/bulk_imports/configuration.rb

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

23 lines
851 B
Ruby
Raw Normal View History

2021-01-03 14:25:43 +05:30
# frozen_string_literal: true
2021-01-29 00:20:46 +05:30
# Stores the authentication data required to access another GitLab instance on
# behalf of a user, to import Groups and Projects directly from that instance.
2021-01-03 14:25:43 +05:30
class BulkImports::Configuration < ApplicationRecord
self.table_name = 'bulk_import_configurations'
belongs_to :bulk_import, inverse_of: :configuration, optional: false
validates :url, :access_token, length: { maximum: 255 }, presence: true
validates :url, public_url: { schemes: %w[http https], enforce_sanitization: true, ascii_only: true },
2022-08-27 11:52:29 +05:30
allow_nil: true
2021-01-03 14:25:43 +05:30
attr_encrypted :url,
2021-06-08 01:23:25 +05:30
key: Settings.attr_encrypted_db_key_base_32,
2021-01-03 14:25:43 +05:30
mode: :per_attribute_iv,
algorithm: 'aes-256-gcm'
attr_encrypted :access_token,
2021-06-08 01:23:25 +05:30
key: Settings.attr_encrypted_db_key_base_32,
2021-01-03 14:25:43 +05:30
mode: :per_attribute_iv,
algorithm: 'aes-256-gcm'
end