From e219da1cb86aecd94e09188c930bef655a2b67f7 Mon Sep 17 00:00:00 2001 From: Matt Todd Date: Mon, 2 Feb 2015 14:30:48 -0800 Subject: [PATCH] Expand AD caps support to v60 This adds support for Windows Server 2008 and above, instead of only 2008 R2 and above. --- lib/github/ldap.rb | 4 ++-- test/ldap_test.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/github/ldap.rb b/lib/github/ldap.rb index ebdfddc..6384023 100644 --- a/lib/github/ldap.rb +++ b/lib/github/ldap.rb @@ -19,7 +19,7 @@ module GitHub # Internal: The capability required to use ActiveDirectory features. # See: http://msdn.microsoft.com/en-us/library/cc223359.aspx. - ACTIVE_DIRECTORY_V61_R2_OID = "1.2.840.113556.1.4.2080".freeze + ACTIVE_DIRECTORY_V60_OID = "1.2.840.113556.1.4.1935".freeze # Utility method to get the last operation result with a human friendly message. # @@ -313,7 +313,7 @@ module GitHub # # Returns true if the host is an ActiveDirectory server, false otherwise. def active_directory_capability? - capabilities[:supportedcapabilities].include?(ACTIVE_DIRECTORY_V61_R2_OID) + capabilities[:supportedcapabilities].include?(ACTIVE_DIRECTORY_V60_OID) end private :active_directory_capability? end diff --git a/test/ldap_test.rb b/test/ldap_test.rb index 48511d8..119c163 100644 --- a/test/ldap_test.rb +++ b/test/ldap_test.rb @@ -80,7 +80,7 @@ module GitHubLdapTestCases def test_search_strategy_detects_active_directory caps = Net::LDAP::Entry.new - caps[:supportedcapabilities] = [GitHub::Ldap::ACTIVE_DIRECTORY_V61_R2_OID] + caps[:supportedcapabilities] = [GitHub::Ldap::ACTIVE_DIRECTORY_V60_OID] @ldap.stub :capabilities, caps do @ldap.configure_search_strategy :detect