Make AD check server specific

parent b99eef44
module Gitlab module Gitlab
module LDAP module LDAP
class Group class Group
attr_accessor :adapter
def self.find_by_cn(cn, adapter) def self.find_by_cn(cn, adapter)
adapter.group(cn) adapter.group(cn)
end end
...@@ -36,7 +38,7 @@ module Gitlab ...@@ -36,7 +38,7 @@ module Gitlab
member_uids.include?(user.uid) member_uids.include?(user.uid)
elsif member_dns.include?(user.dn) elsif member_dns.include?(user.dn)
true true
elsif Gitlab.config.ldap.active_directory elsif adapter.config.active_directory
adapter.dn_matches_filter?(user.dn, active_directory_recursive_memberof_filter) adapter.dn_matches_filter?(user.dn, active_directory_recursive_memberof_filter)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment