profiles_helper.rb 400 Bytes
Newer Older
1
module ProfilesHelper
2 3 4 5
  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
6
        Gitlab::Auth::OAuth::Provider.label_for(user_synced_attributes_metadata.provider)
7 8 9 10
      else
        'LDAP'
      end
    end
11 12
  end
end