Commit 2c8ee981 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

We can collect user groups now

parent 7ba37d86
...@@ -31,8 +31,6 @@ module Gitlab ...@@ -31,8 +31,6 @@ module Gitlab
end.compact end.compact
end end
private
def member_uids def member_uids
if entry.respond_to? :memberuid if entry.respond_to? :memberuid
entry.memberuid entry.memberuid
...@@ -43,6 +41,8 @@ module Gitlab ...@@ -43,6 +41,8 @@ module Gitlab
end.compact end.compact
end end
private
def member_dns def member_dns
if entry.respond_to? :member if entry.respond_to? :member
entry.member entry.member
......
...@@ -21,15 +21,29 @@ module Gitlab ...@@ -21,15 +21,29 @@ module Gitlab
entry.cn.join(" ") entry.cn.join(" ")
end end
def username def uid
entry.uid.join(" ") entry.uid.join(" ")
end end
def username
uid
end
def groups
adapter.groups.select do |group|
group.member_uids.include?(uid)
end
end
private private
def entry def entry
@entry @entry
end end
def adapter
@adapter ||= Gitlab::LDAP::Adapter.new
end
end end
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