Method: JSS::LDAPServer#check_membership

Defined in:
lib/jss/api_object/ldap_server.rb

#check_membership(user, group) ⇒ Boolean?

Returns is the user a member? Nil if unable to check.

Parameters:

  • user (String)

    the username to check for memebership in the group

  • group (String)

    the group name to see if the user is a member

Returns:

  • (Boolean, nil)

    is the user a member? Nil if unable to check

Raises:



327
328
329
330
# File 'lib/jss/api_object/ldap_server.rb', line 327

def check_membership(user, group)
  raise JSS::NoSuchItemError, 'LDAPServer not yet saved in the JSS' unless @in_jss
  self.class.check_membership @id, user, group, api: @api
end