zm-ruby-client 2.0.3 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2922ec4ff3ece6b82feeee37bd6ec363824f822e884df6e5a9eafb87953f3e10
|
4
|
+
data.tar.gz: 6139bad6da17e8dcbb042af4060410ea83ea94ff63b9b0b6ee92a437d46d36c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21213f0d951333e67a030a97f06fb5a578e8970cc080749bc6bb4aa2ecc28d0736686f26879ccafb8404a7ade34230231435195dd262f8f1ed6ea5bbf74c9bc8
|
7
|
+
data.tar.gz: 48c3570bb2b80842b66d01a14c586b4e00e2b78bd2d0eaaebbbc818b17304af62d264e8b1255673d8bf2206e0da959ed9e08883d01abfe3b28b1f5ea1f62544e
|
@@ -29,7 +29,7 @@ module Zm
|
|
29
29
|
attr_writer :used, :domain_key
|
30
30
|
|
31
31
|
def soap_account_connector
|
32
|
-
@soap_account_connector ||= SoapAccountConnector.create(
|
32
|
+
@soap_account_connector ||= SoapAccountConnector.create(soap_config)
|
33
33
|
end
|
34
34
|
alias sacc soap_account_connector
|
35
35
|
|
@@ -90,7 +90,7 @@ module Zm
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def login
|
93
|
-
if
|
93
|
+
if parent_logged?
|
94
94
|
admin_login
|
95
95
|
else
|
96
96
|
account_login
|
@@ -293,6 +293,22 @@ module Zm
|
|
293
293
|
def uploader
|
294
294
|
@uploader ||= Upload.new(self)
|
295
295
|
end
|
296
|
+
|
297
|
+
private
|
298
|
+
|
299
|
+
def soap_config
|
300
|
+
return @parent.config if @parent.respond_to?(:config)
|
301
|
+
return @parent.parent.config if @parent.respond_to?(:parent) && @parent.parent.respond_to?(:config)
|
302
|
+
|
303
|
+
nil
|
304
|
+
end
|
305
|
+
|
306
|
+
def parent_logged?
|
307
|
+
return @parent.logged? if @parent.respond_to?(:logged?)
|
308
|
+
return @parent.parent.logged? if @parent.respond_to?(:parent) && @parent.parent.respond_to?(:logged?)
|
309
|
+
|
310
|
+
false
|
311
|
+
end
|
296
312
|
end
|
297
313
|
end
|
298
314
|
end
|
@@ -47,6 +47,8 @@ module Zm
|
|
47
47
|
|
48
48
|
logger.info 'Get Admin session token'
|
49
49
|
|
50
|
+
@soap_admin_connector.token = nil if logged?
|
51
|
+
|
50
52
|
soap_request = SoapElement.admin(SoapAdminConstants::AUTH_REQUEST)
|
51
53
|
soap_request.add_attributes(name: @config.zimbra_admin_login, password: @config.zimbra_admin_password)
|
52
54
|
soap_resp = @soap_admin_connector.invoke(soap_request, Zm::Client::AuthError)
|
@@ -14,16 +14,20 @@ module Zm
|
|
14
14
|
m: members_node
|
15
15
|
}
|
16
16
|
}
|
17
|
+
|
18
|
+
SoapElement.mail(SoapMailConstants::CREATE_CONTACT_REQUEST).add_attributes(jsns)
|
17
19
|
end
|
18
20
|
|
19
21
|
def to_update
|
20
|
-
{
|
22
|
+
jsns = {
|
21
23
|
cn: {
|
22
24
|
a: instance_variables_array.map(&Utils::A_NODE_PROC),
|
23
25
|
id: @item.id,
|
24
26
|
m: members_node
|
25
27
|
}
|
26
28
|
}
|
29
|
+
|
30
|
+
SoapElement.mail(SoapMailConstants::MODIFY_CONTACT_REQUEST).add_attributes(jsns)
|
27
31
|
end
|
28
32
|
|
29
33
|
def to_patch(hash)
|
@@ -33,6 +37,8 @@ module Zm
|
|
33
37
|
a: hash.map(&Utils::A_ARRAY_PROC).flatten(1).map(&Utils::A_NODE_PROC)
|
34
38
|
}
|
35
39
|
}
|
40
|
+
|
41
|
+
SoapElement.mail(SoapMailConstants::MODIFY_CONTACT_REQUEST).add_attributes(jsns)
|
36
42
|
end
|
37
43
|
|
38
44
|
alias to_create to_jsns
|
data/lib/zm/client/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zm-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maxime Désécot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|