BigW Consortium Gitlab

profile_helper.rb 411 Bytes
Newer Older
1 2 3 4 5 6
module ProfileHelper
  def oauth_active_class provider
    if current_user.provider == provider.to_s
      'active'
    end
  end
7 8 9 10 11 12

  def show_profile_username_tab?
    current_user.can_change_username?
  end

  def show_profile_social_tab?
13
    enabled_social_providers.any? && !current_user.ldap_user?
14 15 16
  end

  def show_profile_remove_tab?
17
    gitlab_config.signup_enabled && !current_user.ldap_user?
18
  end
19
end