gitlab-org--gitlab-foss/app/helpers/profiles_helper.rb
2017-09-06 16:38:52 +03:00

12 lines
394 B
Ruby

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