From a966f72224427fe6830426f459d445cd19ecd5a0 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 14 May 2014 19:08:42 +0200 Subject: [PATCH] Document the Active Directory magic numbers --- lib/gitlab/ldap/person.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/gitlab/ldap/person.rb b/lib/gitlab/ldap/person.rb index 17ffde0e84f..3a97944b122 100644 --- a/lib/gitlab/ldap/person.rb +++ b/lib/gitlab/ldap/person.rb @@ -1,6 +1,9 @@ module Gitlab module LDAP class Person + # Active Directory-specific LDAP filter that checks if bit 2 of the + # userAccountControl attribute is set. + # Source: http://ctogonewild.com/2009/09/03/bitmask-searches-in-ldap/ AD_USER_DISABLED = Net::LDAP::Filter.ex("userAccountControl:1.2.840.113556.1.4.803", "2") def self.find_by_uid(uid, adapter=nil)