diff options
Diffstat (limited to 'app/models/integration.rb')
-rw-r--r-- | app/models/integration.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/models/integration.rb b/app/models/integration.rb index bc86b08018f..d4c76f743a3 100644 --- a/app/models/integration.rb +++ b/app/models/integration.rb @@ -63,6 +63,7 @@ class Integration < ApplicationRecord encode: false, encode_iv: false + alias_attribute :name, :title # Handle assignment of props with symbol keys. # To do this correctly, we need to call the method generated by attr_encrypted. alias_method :attr_encrypted_props=, :properties= @@ -468,11 +469,8 @@ class Integration < ApplicationRecord [] end - # TODO: Once all integrations use `Integrations::Field` we can - # use `#secret?` here. - # See: https://gitlab.com/groups/gitlab-org/-/epics/7652 def secret_fields - fields.select { |f| f[:type] == :password }.pluck(:name) + fields.select(&:secret?).pluck(:name) end # Expose a list of fields in the JSON endpoint. |