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

We can collect user groups now

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