summaryrefslogtreecommitdiff
path: root/app/helpers/profiles_helper.rb
blob: 5a4fda0724c905cb781074966742b8cfe15dbb58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module ProfilesHelper
  def attribute_provider_label(attribute)
    user_synced_attributes_metadata = current_user.user_synced_attributes_metadata
    if user_synced_attributes_metadata&.synced?(attribute)
      if user_synced_attributes_metadata.provider
        Gitlab::OAuth::Provider.label_for(user_synced_attributes_metadata.provider)
      else
        'LDAP'
      end
    end
  end
end