diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-05-14 19:04:00 +0200 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-05-14 19:04:00 +0200 |
commit | 797e807249076920d6c4bb71f6258ca05ee0db34 (patch) | |
tree | d85d8c8ae838f8129f7d8382253d03dc206b3495 | |
parent | 11dba4cee7dc43f88c340bccd553cff0e3d874e4 (diff) | |
download | gitlab-ce-797e807249076920d6c4bb71f6258ca05ee0db34.tar.gz |
Use LDAP::Access.open to reuse the LDAP connection
-rw-r--r-- | lib/gitlab/git_access.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb index eefdb1833fc..f3e781ac4e9 100644 --- a/lib/gitlab/git_access.rb +++ b/lib/gitlab/git_access.rb @@ -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 |