lib/jss/api_object/user.rb in ruby-jss-0.9.2 vs lib/jss/api_object/user.rb in ruby-jss-0.10.0a1

- old
+ new

@@ -207,11 +207,11 @@ @need_to_update = true end ### def ldap_server= (new_val) - raise JSS::InvalidDataError, "No LDAP server in the JSS named #{new_val}" unless JSS::LDAPServer.all_names.include? new_val + raise JSS::InvalidDataError, "No LDAP server in the JSS named #{new_val}" unless JSS::LDAPServer.all_names(api: @api).include? new_val @ldap_server = new_val @need_to_update = true end ### @@ -221,10 +221,10 @@ ### ### @return [void] ### def add_site (site) return nil if @sites.map{|s| s[:name]}.include? site - raise JSS::InvalidDataError, "No site in the JSS named #{site}" unless JSS::Site.all_names.include? site + raise JSS::InvalidDataError, "No site in the JSS named #{site}" unless JSS::Site.all_names(api: @api).include? site @sites << {:name => site} @need_to_update = true end ###