gitlab-org--gitlab-foss/app/helpers/profiles_helper.rb

13 lines
400 B
Ruby
Raw Normal View History

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
Gitlab::Auth::OAuth::Provider.label_for(user_synced_attributes_metadata.provider)
2017-08-29 04:57:41 -04:00
else
'LDAP'
end
end
end
end