zm-ruby-client 2.0.2 → 2.0.4
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: dd3bfb38026878580af8b788cb172b12c437323314ef8c959e01e5f5419f4e9e
|
4
|
+
data.tar.gz: a6da176522c636dfd169055836d5d7037397c20606616cd8b2455fd9234df29d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e177533cd24348761c622081040c8204eff8f9681c8e9626a39d9e156cfd710214aa03b0904b5e2e0415476cbaa7ba9a8f580bef0bef377cb21beee0ffc0614
|
7
|
+
data.tar.gz: 31b9e29e518ad142e0e6f4abc27786faa5745ff39692e91370b4759c850c5e80f98a4c13961fc0c86ca47b032ddbefc7eb2ba56f259b50ea303fad862a8dee46
|
@@ -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)
|
@@ -60,8 +60,7 @@ module Zm
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def to_rename(new_name)
|
63
|
-
SoapElement.admin(SoapAdminConstants::RENAME_DISTRIBUTION_LIST_REQUEST).add_attributes({ id: @id,
|
64
|
-
newName: new_name })
|
63
|
+
SoapElement.admin(SoapAdminConstants::RENAME_DISTRIBUTION_LIST_REQUEST).add_attributes({ id: @item.id, newName: new_name })
|
65
64
|
end
|
66
65
|
|
67
66
|
def attrs_only_set_h
|
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.4
|
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: 2023-12-
|
11
|
+
date: 2023-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -323,7 +323,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
323
323
|
- !ruby/object:Gem::Version
|
324
324
|
version: 1.8.11
|
325
325
|
requirements: []
|
326
|
-
rubygems_version: 3.
|
326
|
+
rubygems_version: 3.1.6
|
327
327
|
signing_key:
|
328
328
|
specification_version: 4
|
329
329
|
summary: zm-ruby-client
|