Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-08-22 23:05:01 +0300
committerStan Hu <stanhu@gmail.com>2018-08-22 23:07:14 +0300
commit7486d424b917cb31f60b26d66cf32c6d4b805eac (patch)
tree702dbbb3048f4f40d62f25f909c3d57f52b91be6 /lib
parent0e9dc23d4622332c3f8874ba024cac9aa28277a3 (diff)
Fix broken Git over HTTP clones with LDAP users
Due to a regression in !20608, the LDAP authenticator was not being used unless OmniAuth was enabled. This change allows the LDAP provider to be used if it is configured regardless of the OmniAuth setting. Closes #50579
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/auth/o_auth/provider.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab/auth/o_auth/provider.rb b/lib/gitlab/auth/o_auth/provider.rb
index e73743944a9..26da9d09ccc 100644
--- a/lib/gitlab/auth/o_auth/provider.rb
+++ b/lib/gitlab/auth/o_auth/provider.rb
@@ -29,6 +29,7 @@ module Gitlab
def self.enabled?(name)
return true if name == 'database'
+ return true if self.ldap_provider?(name) && providers.include?(name.to_sym)
Gitlab::Auth.omniauth_enabled? && providers.include?(name.to_sym)
end