Commit e2e900a338894010e7ba4dac89fa7b926803a977
1 parent
b75777fd
Exists in
spb-stable
and in
3 other branches
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.
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
lib/api/internal.rb
... | ... | @@ -35,7 +35,9 @@ module API |
35 | 35 | user = key.user |
36 | 36 | |
37 | 37 | return false if user.blocked? |
38 | - return false if user.ldap_user? && Gitlab::LDAP::User.blocked?(user.extern_uid) | |
38 | + if Gitlab.config.ldap.enabled | |
39 | + return false if user.ldap_user? && Gitlab::LDAP::User.blocked?(user.extern_uid) | |
40 | + end | |
39 | 41 | |
40 | 42 | action = case git_cmd |
41 | 43 | when *DOWNLOAD_COMMANDS | ... | ... |