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

Merge pull request #6189 from jcockhren/api_ldap_check_for_user

the existence of former ldap users doesn't imply LDAP is enabled.
parents 81360488 e2e900a3
...@@ -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?
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 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