zuora_connect 2.0.3e → 2.0.3f
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: 88e407d0338daf55ef54d679e31e24fe20207302baf36ce02610d0866f430e75
|
4
|
+
data.tar.gz: a7cbb416e61808e2438c1de65492f38ad23ef201000f486bee69329c91482459
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d220ae8c3b4fb197de436a193b9465c13062406665ce1a0cc052cc4207727384f72c0638727a31a86eb306e47da6ffd5a5b5f42c6eaea8ceca54760e8b7f66f
|
7
|
+
data.tar.gz: 5c051665949d76218d84d7597d907ea26767f44573da36b504a48d01c5773c04204fc6bdf28e935d3bdb5a2bc5feba0bb753d6d2971de12477bbe7d8a65b0ffd
|
@@ -140,7 +140,25 @@ module ZuoraConnect
|
|
140
140
|
if zuora_instance_id.present?
|
141
141
|
appinstances = ZuoraConnect::AppInstance.where("zuora_entity_ids ?& array[:entities] = true AND zuora_domain = :host AND id = :id", entities: [zuora_entity_id], host: zuora_client.rest_domain, id: zuora_instance_id).pluck(:id, :name)
|
142
142
|
else
|
143
|
-
|
143
|
+
#if app_instance_ids is present then permissions still controlled by connect
|
144
|
+
if params[:app_instance_ids].present?
|
145
|
+
begin
|
146
|
+
navbar, response = zuora_client.rest_call(url: zuora_client.rest_endpoint("v1/navigation"))
|
147
|
+
|
148
|
+
urls = a['menus'].map {|x| x['url']}
|
149
|
+
app_env = ENV["DEIS_APP"] || "xyz123"
|
150
|
+
url = urls.compact.select {|url| File.basename(url).start_with?(app_env + '?')}.first
|
151
|
+
task_ids = JSON.parse(Base64.urlsafe_decode64(CGI.parse(URI.parse(url).query)["app_instance_ids"][0]))
|
152
|
+
|
153
|
+
appinstances = ZuoraConnect::AppInstance.where(:id => task_ids).pluck(:id, :name)
|
154
|
+
rescue => ex
|
155
|
+
ZuoraConnect.logger.error(ex)
|
156
|
+
render "zuora_connect/static/invalid_launch_request"
|
157
|
+
return
|
158
|
+
end
|
159
|
+
else
|
160
|
+
appinstances = ZuoraConnect::AppInstance.where("zuora_entity_ids ?& array[:entities] = true AND zuora_domain = :host", entities: [zuora_entity_id], host: zuora_client.rest_domain).pluck(:id, :name)
|
161
|
+
end
|
144
162
|
end
|
145
163
|
|
146
164
|
#One deployed instance
|
@@ -158,9 +176,7 @@ module ZuoraConnect
|
|
158
176
|
#Create new app instance
|
159
177
|
raise "Do not support new instance creation right now."
|
160
178
|
end
|
161
|
-
|
162
|
-
|
163
|
-
if params[:app_instance_ids].present?
|
179
|
+
elsif params[:app_instance_ids].present?
|
164
180
|
if !params[:app_instance_id].present?
|
165
181
|
begin
|
166
182
|
app_instance_ids = JSON.parse(Base64.urlsafe_decode64(params[:app_instance_ids]))
|