Method: JSS::LDAPServer#find_group
- Defined in:
- lib/jss/api_object/ldap_server.rb
#find_group(group, exact = false) ⇒ Array<Hash>
Returns The groupname and uid for all groups matching the query.
315 316 317 318 319 |
# File 'lib/jss/api_object/ldap_server.rb', line 315 def find_group(group, exact = false) raise JSS::NoSuchItemError, 'LDAPServer not yet saved in the JSS' unless @in_jss raw = api.get_rsrc("#{RSRC_BASE}/id/#{@id}/group/#{CGI.escape group.to_s}")[:ldap_groups] exact ? raw.select { |u| u[:groupname] == group } : raw end |