File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -147,23 +147,20 @@ def load_group(group_entry)
147
147
#
148
148
# Returns an Array of Net::LDAP::Entry.
149
149
def search ( options , &block )
150
- result = if options [ :base ]
151
- instrument "github_ldap.search_base" , options do
152
- @connection . search ( options , &block )
153
- end
154
- else
155
- instrument "github_ldap.search_bases" , options . dup do |payload |
156
- search_domains . each_with_object ( [ ] ) do |base , result |
157
- instrument "github_ldap.search_base" , payload . merge ( :base => base ) do
150
+ instrument "github_ldap.search" , options . dup do |payload |
151
+ result =
152
+ if options [ :base ]
153
+ @connection . search ( options , &block )
154
+ else
155
+ search_domains . each_with_object ( [ ] ) do |base , result |
158
156
rs = @connection . search ( options . merge ( :base => base ) , &block )
159
157
result . concat Array ( rs ) unless rs == false
160
158
end
161
159
end
162
- end
163
- end
164
160
165
- return [ ] if result == false
166
- Array ( result )
161
+ return [ ] if result == false
162
+ Array ( result )
163
+ end
167
164
end
168
165
169
166
# Internal - Determine whether to use encryption or not.
You can’t perform that action at this time.
0 commit comments