diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-22 09:08:39 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-22 09:08:39 +0000 |
commit | 001243986195143c395a9811d8254bbf1b9ebfa1 (patch) | |
tree | 6d6d665154fd38beea6ea7f8985330f956565bb3 /app/helpers/auth_helper.rb | |
parent | 83d8c1d61762898eb4e69878f117cbb2ef5be494 (diff) | |
download | gitlab-ce-001243986195143c395a9811d8254bbf1b9ebfa1.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/auth_helper.rb')
-rw-r--r-- | app/helpers/auth_helper.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/helpers/auth_helper.rb b/app/helpers/auth_helper.rb index a9c4cfe7dcc..e8d3d5f62cb 100644 --- a/app/helpers/auth_helper.rb +++ b/app/helpers/auth_helper.rb @@ -89,7 +89,17 @@ module AuthHelper def enabled_button_based_providers disabled_providers = Gitlab::CurrentSettings.disabled_oauth_sign_in_sources || [] - button_based_providers.map(&:to_s) - disabled_providers + providers = button_based_providers.map(&:to_s) - disabled_providers + providers.sort_by do |provider| + case provider + when 'google_oauth2' + 0 + when 'github' + 1 + else + 2 + end + end end def button_based_providers_enabled? |