lib/jss/api_object/ldap_server.rb
# Search for a user in this ldap server
#
# @param user[String] the username to search for
#
# @param exact[Boolean] if true, force an exact match, otherwise use wildcards
#
# @return [Array<Hash>] The mapped LDAP data for all usernames matching the query
#
Search for a user in this ldap server
Search for a user in this ldap server
def find_user(user, exact = false)
      raise JSS::NoSuchItemError, 'LDAPServer not yet saved in the JSS' unless @in_jss
      raw = api.get_rsrc("#{RSRC_BASE}/id/#{@id}/user/#{CGI.escape user.to_s}")[:ldap_users]
      exact ? raw.select { |u| u[:username] == user } : raw
    end
def find_user ( user , exact = false ) raise JSS :: NoSuchItemError , 'LDAPServer not yet saved in the JSS' unless @in_jss raw = api . get_rsrc ( "#{RSRC_BASE}/id/#{@id}/user/#{CGI.escape user.to_s}" ) [ :ldap_users ] exact ? raw . select { | u | u [ :username ] == user } : raw end
Search for a user in this ldap server
Search for a user in this ldap server
The mapped LDAP data for all usernames matching the query
The mapped LDAP data for all usernames matching the query
Array<Hash>
user
the username to search for
the username to search for
exact
if true, force an exact match, otherwise use wildcards
if true force an exact match otherwise use wildcards