File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -261,13 +261,18 @@ def configure_search_strategy(strategy = nil)
261
261
configure_member_search_strategy ( strategy )
262
262
end
263
263
264
+ # Internal: Configure the entry search strategy.
265
+ #
266
+ # If the user has configured GHE to use forest searches AND we have an active
267
+ # Directory instance that has the right capabilities, use a ForestSearch
268
+ # strategy. Otherwise, the entry search strategy is simple the existing LDAP
269
+ # connection object.
270
+ #
264
271
def configure_entry_search_strategy ( use_forest_search )
265
- @entry_search_strategy = begin
266
- if use_forest_search && active_directory_capability? && capabilities [ :configurationnamingcontext ] . any?
267
- @entry_search_strategy = GitHub ::Ldap ::ForestSearch . new ( @connection )
268
- else
269
- @entry_search_strategy = @connection
270
- end
272
+ @entry_search_strategy = if use_forest_search && active_directory_capability? && capabilities [ :configurationnamingcontext ] . any?
273
+ @entry_search_strategy = GitHub ::Ldap ::ForestSearch . new ( @connection )
274
+ else
275
+ @entry_search_strategy = @connection
271
276
end
272
277
end
273
278
@@ -322,7 +327,6 @@ def configure_member_search_strategy(strategy = nil)
322
327
end
323
328
end
324
329
325
-
326
330
# Internal: Detect whether the LDAP host is an ActiveDirectory server.
327
331
#
328
332
# See: http://msdn.microsoft.com/en-us/library/cc223359.aspx.
You can’t perform that action at this time.
0 commit comments