diff options
Diffstat (limited to 'lib/gitlab/auth/o_auth')
-rw-r--r-- | lib/gitlab/auth/o_auth/provider.rb | 9 | ||||
-rw-r--r-- | lib/gitlab/auth/o_auth/user.rb | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/gitlab/auth/o_auth/provider.rb b/lib/gitlab/auth/o_auth/provider.rb index 1ca59aa827b..1eae7af442d 100644 --- a/lib/gitlab/auth/o_auth/provider.rb +++ b/lib/gitlab/auth/o_auth/provider.rb @@ -5,10 +5,11 @@ module Gitlab module OAuth class Provider LABELS = { - "github" => "GitHub", - "gitlab" => "GitLab.com", - "google_oauth2" => "Google", - "azure_oauth2" => "Azure AD" + "github" => "GitHub", + "gitlab" => "GitLab.com", + "google_oauth2" => "Google", + "azure_oauth2" => "Azure AD", + 'atlassian_oauth2' => 'Atlassian' }.freeze def self.authentication(user, provider) diff --git a/lib/gitlab/auth/o_auth/user.rb b/lib/gitlab/auth/o_auth/user.rb index 086f4a2e91c..3211d2ffaea 100644 --- a/lib/gitlab/auth/o_auth/user.rb +++ b/lib/gitlab/auth/o_auth/user.rb @@ -273,7 +273,11 @@ module Gitlab end def auto_link_user? - Gitlab.config.omniauth.auto_link_user + auto_link = Gitlab.config.omniauth.auto_link_user + return auto_link if [true, false].include?(auto_link) + + auto_link = Array(auto_link) + auto_link.include?(auth_hash.provider) end end end |