Commit 0744eac9 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge pull request #6189 from jcockhren/api_ldap_check_for_user

the existence of former ldap users doesn't imply LDAP is enabled.
......@@ -35,7 +35,9 @@ class Internal < Grape::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% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment