Commit 0744eac9c61efcba998a5328acf01f80bdfa6e84
Exists in
spb-stable
and in
3 other branches
Merge pull request #6189 from jcockhren/api_ldap_check_for_user
the existence of former ldap users doesn't imply LDAP is enabled.
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 | ... | ... |