Commit e2e900a3 authored by Jurnell Cockhren's avatar Jurnell Cockhren

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.
parent b75777fd
...@@ -35,7 +35,9 @@ module API ...@@ -35,7 +35,9 @@ module API
user = key.user user = key.user
return false if user.blocked? return false if user.blocked?
if Gitlab.config.ldap.enabled
return false if user.ldap_user? && Gitlab::LDAP::User.blocked?(user.extern_uid) return false if user.ldap_user? && Gitlab::LDAP::User.blocked?(user.extern_uid)
end
action = case git_cmd action = case git_cmd
when *DOWNLOAD_COMMANDS when *DOWNLOAD_COMMANDS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment