File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
lib/github/ldap/membership_validators Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -24,23 +24,18 @@ def perform(entry)
24
24
# Sets the entry to the base and scopes the search to the base,
25
25
# according to the source documentation, found here:
26
26
# http://msdn.microsoft.com/en-us/library/aa746475(v=vs.85).aspx
27
-
28
- filter = membership_in_chain_filter ( entry )
29
- options = {
30
- filter : filter ,
27
+ #
28
+ # Use ReferralChaser to chase any potential referrals for an entry that may be owned by a different
29
+ # domain controller.
30
+ matched = referral_chaser . search \
31
+ filter : membership_in_chain_filter ( entry ) ,
31
32
base : entry . dn ,
32
33
scope : Net ::LDAP ::SearchScope_BaseObject ,
33
34
return_referrals : true ,
34
35
attributes : ATTRS
35
- }
36
-
37
- # Chase any potential referrals for an entry that may be owned by a different
38
- # domain controller.
39
- matched = referral_chaser . search ( options )
40
36
41
37
# membership validated if entry was matched and returned as a result
42
38
# Active Directory DNs are case-insensitive
43
-
44
39
result = Array ( matched ) . map { |m | m . dn . downcase } . include? ( entry . dn . downcase )
45
40
end
46
41
You can’t perform that action at this time.
0 commit comments