summaryrefslogtreecommitdiff
path: root/app/helpers/profiles_helper.rb
blob: a6a57db3002aad4000eeed8633c0ccb822ac8517 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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::Auth::OAuth::Provider.label_for(user_synced_attributes_metadata.provider)
      else
        'LDAP'
      end
    end
  end

  def show_user_status_field?
    Feature.enabled?(:user_status_form) || cookies[:feature_user_status_form] == 'true'
  end
end