kaui 3.0.8 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0407ec65d7d8fbb849a36b506a1f2f31d37f50fb3f70cc9acfbe444624e247ae
|
4
|
+
data.tar.gz: 92ba60faa926a45b0112de00d220c3fca430187c7cfcd5e03e2578d984de3a88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d543f8aa470d4425b229ebebf3da3a19bf7774788a368a973db2c2ba4edbaf072d5282c3b32a18de66c5ddb3827aae929d60c21fc92edbe2e3988cff799cc5ac
|
7
|
+
data.tar.gz: fa917bc4b277a5e06cb5b6898b22fa65b52ec1e4048f86bd0e1f39b098ce292ed77175e5ea3144d7d123458758f20a82eba39db161428df81565a9ae16d1525c
|
@@ -103,7 +103,7 @@ module Kaui
|
|
103
103
|
end
|
104
104
|
|
105
105
|
tenants_for_current_user = retrieve_tenants_for_current_user
|
106
|
-
tenants =
|
106
|
+
tenants = Kaui::Tenant.where(id: tenants).select { |tenant| tenants_for_current_user.include?(tenant.kb_tenant_id) }.map(&:id)
|
107
107
|
|
108
108
|
allowed_user.kaui_tenant_ids = tenants
|
109
109
|
|
@@ -31,8 +31,12 @@ module Kaui
|
|
31
31
|
options[:api_key] = param_tenant[:api_key]
|
32
32
|
options[:api_secret] = param_tenant[:api_secret]
|
33
33
|
new_tenant = Kaui::AdminTenant.find_by_api_key(param_tenant[:api_key], options)
|
34
|
-
rescue KillBillClient::API::Unauthorized, KillBillClient::API::NotFound
|
34
|
+
rescue KillBillClient::API::Unauthorized, KillBillClient::API::NotFound, KillBillClient::API::InternalServerError => e
|
35
35
|
# Create the tenant in Kill Bill
|
36
|
+
if e.instance_of?(KillBillClient::API::InternalServerError) && !e.message&.include?('TenantCacheLoader cannot find value')
|
37
|
+
flash[:error] = "Internal server error while retrieving tenant: #{as_string(e)}"
|
38
|
+
redirect_to admin_tenants_path and return
|
39
|
+
end
|
36
40
|
new_tenant = Kaui::AdminTenant.new
|
37
41
|
new_tenant.external_key = param_tenant[:name]
|
38
42
|
new_tenant.api_key = param_tenant[:api_key]
|
@@ -117,7 +117,7 @@ module Kaui
|
|
117
117
|
def find_value_from_properties(properties, key)
|
118
118
|
return nil if key.nil? || properties.nil?
|
119
119
|
|
120
|
-
prop =
|
120
|
+
prop = properties.find { |kv| kv.key.to_s == key.to_s }
|
121
121
|
prop&.value
|
122
122
|
end
|
123
123
|
end
|
@@ -25,7 +25,7 @@ module Kaui
|
|
25
25
|
|
26
26
|
ALL_OBJECT_TYPES.each do |object_type|
|
27
27
|
define_singleton_method "all_for_#{object_type.downcase}" do |options_for_klient|
|
28
|
-
|
28
|
+
all('NONE', options_for_klient).delete_if { |tag_definition| !tag_definition.applicable_object_types.include?(object_type) }.sort
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
data/lib/kaui/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kill Bill core team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|