debian-mirror-gitlab/app/helpers/profiles_helper.rb

13 lines
400 B
Ruby
Raw Normal View History

2017-09-10 17:25:29 +05:30
module ProfilesHelper
2018-03-17 18:26:18 +05:30
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-03-27 19:54:05 +05:30
Gitlab::Auth::OAuth::Provider.label_for(user_synced_attributes_metadata.provider)
2018-03-17 18:26:18 +05:30
else
'LDAP'
end
end
2017-09-10 17:25:29 +05:30
end
end