Method: JSS::Scopable::Scope#remove_limitation
- Defined in:
- lib/jss-api/api_object/scopable/scope.rb
#remove_limitation(key, item) ⇒ void
TODO:
handle ldap user/group lookups
This method returns an undefined value.
Remove a single item for limiting this scope.
443 444 445 446 447 448 449 450 451 |
# File 'lib/jss-api/api_object/scopable/scope.rb', line 443 def remove_limitation( key, item) raise JSS::InvalidDataError, "Limitation key must be one of :#{LIMITATIONS.join(', :')}" unless LIMITATIONS.include? key raise JSS::InvalidDataError, "Item must be a #{key} name." unless item.kind_of? String return nil unless @limitations[key] and @limitations[key].include? item @limitations[key] -= [item] @container.should_update if @container end |