提交 e2e900a3 编写于 作者: J 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.
上级 b75777fd
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册