summaryrefslogtreecommitdiff
path: root/lib/api/internal.rb
diff options
context:
space:
mode:
authorJurnell Cockhren <jurnell.cockhren@sophicware.com>2014-01-28 15:10:36 -0600
committerJurnell Cockhren <jurnell.cockhren@sophicware.com>2014-01-28 15:10:36 -0600
commite2e900a338894010e7ba4dac89fa7b926803a977 (patch)
tree15f89e1a95ef720bcdcb49aaf8963e66717a9c54 /lib/api/internal.rb
parentb75777fd95ac7e432a6f576c018b8285efffbca4 (diff)
downloadgitlab-ce-e2e900a338894010e7ba4dac89fa7b926803a977.tar.gz
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/api/internal.rb')
-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