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:
authorJurnell Cockhren <jurnell.cockhren@sophicware.com>2014-01-29 01:10:36 +0400
committerJurnell Cockhren <jurnell.cockhren@sophicware.com>2014-01-29 01:10:36 +0400
commite2e900a338894010e7ba4dac89fa7b926803a977 (patch)
tree15f89e1a95ef720bcdcb49aaf8963e66717a9c54 /lib
parentb75777fd95ac7e432a6f576c018b8285efffbca4 (diff)
In the case when a user can and has authenticated with ldap, however
ldap is disabled in the gitlab config, this fixes the API still calling the ldap backend.
Diffstat (limited to 'lib')
-rw-r--r--lib/api/internal.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb
index ed6b50c3a6a..ebc9fef07b4 100644
--- a/lib/api/internal.rb
+++ b/lib/api/internal.rb
@@ -35,7 +35,9 @@ module API
user = key.user
return false if user.blocked?
- return false if user.ldap_user? && Gitlab::LDAP::User.blocked?(user.extern_uid)
+ if Gitlab.config.ldap.enabled
+ return false if user.ldap_user? && Gitlab::LDAP::User.blocked?(user.extern_uid)
+ end
action = case git_cmd
when *DOWNLOAD_COMMANDS