diff options
-rw-r--r-- | lib/api/internal.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb index ed6b50c3a6a..ebc9fef07b4 100644 --- a/lib/api/internal.rb +++ b/lib/api/internal.rb @@ -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 |