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

application_setting_masked_attrs.rb « concerns « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 14a7185e39e8d6f80b804b0a9acf7d5d4c197813 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

# Similar to MASK_PASSWORD mechanism we do for EE, see:
# https://gitlab.com/gitlab-org/gitlab/-/blob/463bb1f855d71fadef931bd50f1692ee04f211a8/ee/app/models/ee/application_setting.rb#L15
# but for non-EE attributes.
module ApplicationSettingMaskedAttrs
  MASK = '*****'

  def ai_access_token=(value)
    return if value == MASK

    super
  end
end