class LdapFluff::FreeIPA::MemberService
handles the naughty bits of posix ldap
Public Class Methods
new(ldap, config)
click to toggle source
Calls superclass method
LdapFluff::GenericMemberService.new
# File lib/ldap_fluff/freeipa_member_service.rb, line 6 def initialize(ldap, config) @attr_login = (config.attr_login || 'uid') super end
Public Instance Methods
find_user_groups(uid)
click to toggle source
return an ldap user with groups attached note : this method is not particularly fast for large ldap systems
# File lib/ldap_fluff/freeipa_member_service.rb, line 13 def find_user_groups(uid) user = find_user(uid) # if group data is missing, they aren't querying with a user # with enough privileges user.delete_if { |u| u.nil? || !u.respond_to?(:attribute_names) || !u.attribute_names.include?(:memberof) } raise InsufficientQueryPrivilegesException if user.size < 1 get_groups(user[0][:memberof]) end