Class: Zm::Client::CosAccountsCollection

Inherits:
AccountsCollection show all
Defined in:
lib/zm/client/cos/cos_accounts_collection.rb

Overview

Collection Accounts from cos

Constant Summary

Constants inherited from Base::ObjectsCollection

Base::ObjectsCollection::METHODS_MISSING_LIST

Instance Attribute Summary

Attributes inherited from Base::ObjectsCollection

#parent

Instance Method Summary collapse

Methods inherited from AccountsCollection

#find_by!, #initialize, #quotas

Methods inherited from Base::AdminObjectsCollection

#attrs, #clear, #count, #find_by, #find_by_or_nil, #find_each, #initialize, #ldap, #where

Methods inherited from Base::ObjectsCollection

#all, #all!, #find, #first, #logger, #method_missing, #new, #order, #page, #per_page, #respond_to_missing?

Methods included from Inspector

#inspect, #instance_variables_map, #to_h, #to_s

Constructor Details

This class inherits a constructor from Zm::Client::AccountsCollection

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Zm::Client::Base::ObjectsCollection

Instance Method Details

#build_responseObject



7
8
9
10
11
# File 'lib/zm/client/cos/cos_accounts_collection.rb', line 7

def build_response
  ldap_filter.add(default_ldap_filter)

  super
end

#default_ldap_filterObject



13
14
15
16
# File 'lib/zm/client/cos/cos_accounts_collection.rb', line 13

def default_ldap_filter
  domain_filter = @parent.domains.all.map { |domain| "(zimbraMailDeliveryAddress=*@#{domain.name})" }.join
  "(|(zimbraCOSId=#{@parent.id})(&(!(zimbraCOSId=*))(|#{domain_filter})))"
end