Skip to content

Commit e219da1

Browse files
committed
Expand AD caps support to v60
This adds support for Windows Server 2008 and above, instead of only 2008 R2 and above.
1 parent 47be59a commit e219da1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/github/ldap.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Ldap
1919

2020
# Internal: The capability required to use ActiveDirectory features.
2121
# See: http://msdn.microsoft.com/en-us/library/cc223359.aspx.
22-
ACTIVE_DIRECTORY_V61_R2_OID = "1.2.840.113556.1.4.2080".freeze
22+
ACTIVE_DIRECTORY_V60_OID = "1.2.840.113556.1.4.1935".freeze
2323

2424
# Utility method to get the last operation result with a human friendly message.
2525
#
@@ -313,7 +313,7 @@ def configure_member_search_strategy(strategy = nil)
313313
#
314314
# Returns true if the host is an ActiveDirectory server, false otherwise.
315315
def active_directory_capability?
316-
capabilities[:supportedcapabilities].include?(ACTIVE_DIRECTORY_V61_R2_OID)
316+
capabilities[:supportedcapabilities].include?(ACTIVE_DIRECTORY_V60_OID)
317317
end
318318
private :active_directory_capability?
319319
end

test/ldap_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def test_search_strategy_defaults
8080

8181
def test_search_strategy_detects_active_directory
8282
caps = Net::LDAP::Entry.new
83-
caps[:supportedcapabilities] = [GitHub::Ldap::ACTIVE_DIRECTORY_V61_R2_OID]
83+
caps[:supportedcapabilities] = [GitHub::Ldap::ACTIVE_DIRECTORY_V60_OID]
8484

8585
@ldap.stub :capabilities, caps do
8686
@ldap.configure_search_strategy :detect

0 commit comments

Comments
 (0)