Commit cc768fdd authored by Jacob Vosmaer's avatar Jacob Vosmaer

Reuse LDAP adapter in Group instances

parent b040f5da
......@@ -63,7 +63,7 @@ module Gitlab
options.merge!(size: size) if size
ldap.search(options).map do |entry|
Gitlab::LDAP::Group.new(entry)
Gitlab::LDAP::Group.new(entry, self)
end
end
......
......@@ -12,9 +12,10 @@ module Gitlab
adapter.group(cn)
end
def initialize(entry)
def initialize(entry, adapter=nil)
Rails.logger.debug { "Instantiating #{self.class.name} with LDIF:\n#{entry.to_ldif}" }
@entry = entry
@adapter = adapter
end
def cn
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment