Bring back further to v51 for 2k3+ support

This commit is contained in:
Matt Todd 2015-02-02 14:44:59 -08:00
Родитель e219da1cb8
Коммит 5cfcb2f645
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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_V60_OID = "1.2.840.113556.1.4.1935".freeze
ACTIVE_DIRECTORY_V51_OID = "1.2.840.113556.1.4.1670".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_V60_OID)
capabilities[:supportedcapabilities].include?(ACTIVE_DIRECTORY_V51_OID)
end
private :active_directory_capability?
end

Просмотреть файл

@ -80,7 +80,7 @@ module GitHubLdapTestCases
def test_search_strategy_detects_active_directory
caps = Net::LDAP::Entry.new
caps[:supportedcapabilities] = [GitHub::Ldap::ACTIVE_DIRECTORY_V60_OID]
caps[:supportedcapabilities] = [GitHub::Ldap::ACTIVE_DIRECTORY_V51_OID]
@ldap.stub :capabilities, caps do
@ldap.configure_search_strategy :detect