提交 797e8072 编写于 作者: J Jacob Vosmaer

Use LDAP::Access.open to reuse the LDAP connection

上级 11dba4ce
......@@ -66,8 +66,8 @@ module Gitlab
if Gitlab.config.ldap.enabled
if user.ldap_user?
# Check if LDAP user exists and match LDAP user_filter
unless Gitlab::LDAP::Access.new.allowed?(user)
return false
Gitlab::LDAP::Access.open do |adapter|
return false unless adapter.allowed?(user)
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册