Commit a599d8120ddf4d9a6f66ff0bfbd024e414f38772

Authored by Dmitriy Zaporozhets
2 parents 7157f79c 9818775c

Merge branch 'fix/social-account-block' into 'master'

Fix Social Account Block

If you have omniauth enabled, but don't have one of the "Social" providers enabled (GitHub, Twitter, Google), the "Social Accounts" sections shows up, but without icons. This occurred when I was testing Shibboleth. This fixes the issues by checking if there are any `enabled_oauth_providers` rather than if just `Gitlab.config.omniauth.enabled`. Not quite sure how to implement a test for this, but it works :).
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/helpers/profile_helper.rb
... ... @@ -10,7 +10,7 @@ module ProfileHelper
10 10 end
11 11  
12 12 def show_profile_social_tab?
13   - Gitlab.config.omniauth.enabled && !current_user.ldap_user?
  13 + enabled_social_providers.any? && !current_user.ldap_user?
14 14 end
15 15  
16 16 def show_profile_remove_tab?
... ...