Merge pull request #6189 from jcockhren/api_ldap_check_for_user

the existence of former ldap users doesn't imply LDAP is enabled.
This commit is contained in:
Dmitriy Zaporozhets 2014-02-17 09:26:10 +02:00
commit 0744eac9c6
1 changed files with 3 additions and 1 deletions

View File

@ -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