2018-08-18 07:19:57 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-06-06 11:39:54 -04:00
|
|
|
module ProfilesHelper
|
2017-08-29 04:57:41 -04:00
|
|
|
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
|
2018-02-23 07:10:39 -05:00
|
|
|
Gitlab::Auth::OAuth::Provider.label_for(user_synced_attributes_metadata.provider)
|
2017-08-29 04:57:41 -04:00
|
|
|
else
|
|
|
|
'LDAP'
|
|
|
|
end
|
|
|
|
end
|
2017-06-06 11:39:54 -04:00
|
|
|
end
|
|
|
|
end
|