summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2014-05-14 19:08:42 +0200
committerJacob Vosmaer <contact@jacobvosmaer.nl>2014-05-14 19:08:42 +0200
commita966f72224427fe6830426f459d445cd19ecd5a0 (patch)
tree729383c3e59cfed6369dc85de80b838952aa5f2f
parent797e807249076920d6c4bb71f6258ca05ee0db34 (diff)
downloadgitlab-ce-a966f72224427fe6830426f459d445cd19ecd5a0.tar.gz
Document the Active Directory magic numbers
-rw-r--r--lib/gitlab/ldap/person.rb3
1 files changed, 3 insertions, 0 deletions
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)