Class: Zimbra::DirectoryService
- Inherits:
-
HandsoapService
- Object
- Handsoap::Service
- HandsoapService
- Zimbra::DirectoryService
- Defined in:
- lib/zimbra/directory.rb
Defined Under Namespace
Constant Summary collapse
- ZIMBRA_TYPES_HASH =
This are the type off types (objects) that Zimbra has “distributionlists,aliases,accounts,dynamicgroups,resources,domains”
{ distribution_list: { zimbra_type: 'distributionlists', node_name: 'dl', class: Zimbra::DistributionList }, distributionlist: { zimbra_type: 'distributionlists', node_name: 'dl', class: Zimbra::DistributionList }, #alias: { zimbra_type: 'aliases', node_name: 'alias', class: Zimbra::Alias }, account: { zimbra_type: 'accounts', node_name: 'account', class: Zimbra::Account }, domain: { zimbra_type: 'domains', node_name: 'domain', class: Zimbra::Domain } }
Instance Method Summary collapse
- #add_grant(id, type, acl) ⇒ Object
-
#get_grants(id, type) ⇒ Object
method to get the grants on an object check files.zimbra.com/docs/soap_api/8.5.0/api-reference/zimbraAdmin/GetGrants.html.
- #revoke_grant(id, type, acl) ⇒ Object
- #search(query, type, domain, options = {}) ⇒ Object
Methods inherited from HandsoapService
#on_create_document, #on_response_document
Methods included from HandsoapUriOverrides
#envelope_namespace, #request_content_type, #uri
Methods included from HandsoapNamespaces
#request_namespaces, #response_namespaces
Methods included from HandsoapErrors
#http_error?, #http_not_found?, #on_after_create_http_request, #on_http_error, #report_error, #soap_fault_not_found?
Instance Method Details
#add_grant(id, type, acl) ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/zimbra/directory.rb', line 50 def add_grant(id, type, acl) xml = invoke("n2:GrantRightRequest") do || Builder.add_grant(, id, type, acl) end return nil if soap_fault_not_found? true end |
#get_grants(id, type) ⇒ Object
method to get the grants on an object check files.zimbra.com/docs/soap_api/8.5.0/api-reference/zimbraAdmin/GetGrants.html
68 69 70 71 72 73 74 |
# File 'lib/zimbra/directory.rb', line 68 def get_grants(id, type) xml = invoke('n2:GetGrantsRequest') do || Builder.get_grants(, id, type) end return nil if soap_fault_not_found? Parser.get_grants_response(xml, type) end |
#revoke_grant(id, type, acl) ⇒ Object
76 77 78 79 80 81 82 |
# File 'lib/zimbra/directory.rb', line 76 def revoke_grant(id, type, acl) xml = invoke("n2:RevokeRightRequest") do || Builder.revoke_grant(, id, type, acl) end return nil if soap_fault_not_found? true end |
#search(query, type, domain, options = {}) ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/zimbra/directory.rb', line 58 def search(query, type, domain, = {}) xml = invoke("n2:SearchDirectoryRequest") do || Builder.search_directory(, query, type, domain, ) end return nil if soap_fault_not_found? Parser.search_directory_response(xml, type) end |