zuora_connect 2.0.18 → 2.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zuora_connect/controllers/helpers.rb +4 -4
- data/lib/zuora_connect/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18639a3f76ca47faf64daf00fb6c18fcfb8cee474135134dd8befc7a90dfdb6e
|
4
|
+
data.tar.gz: c58522d19f6f381ae408fae8f6cd96d6925616d1227b12b419dbd2936f36f7be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b508a489d6cdb1e50e99033221d5ef491362bae48543702502df14bf3ba4f9ced491fac1f64ecd0a9a3bf1333ca8fecd020344b37ef4844a4e1dad221949893d
|
7
|
+
data.tar.gz: bbf286bf4ba69caa2e1cf71b197a81dc0a0220ed78351eae870f1194de92e1f77f592adddd3381964074c02e39c3d93c59667634262c3a2563765d7e68e363e8
|
@@ -21,7 +21,7 @@ module ZuoraConnect
|
|
21
21
|
ZuoraConnect.logger.debug("[#{@appinstance.id}] API REQUEST - API token") if @appinstance.present?
|
22
22
|
check_instance
|
23
23
|
elsif ZuoraConnect::AppInstance::INTERNAL_HOSTS.include?(request.headers.fetch("HOST", nil))
|
24
|
-
zuora_host, zuora_entity_id, zuora_instance_id = [request.headers['zuora-host'], (request.headers['zuora-entity-ids'] || "").gsub('-',''), request.headers['zuora-instance-id']
|
24
|
+
zuora_host, zuora_entity_id, zuora_instance_id = [request.headers['zuora-host'], (request.headers['zuora-entity-ids'] || "").gsub('-',''), request.headers['zuora-instance-id']]
|
25
25
|
|
26
26
|
#Validate host present
|
27
27
|
if zuora_host.blank?
|
@@ -35,7 +35,7 @@ module ZuoraConnect
|
|
35
35
|
end
|
36
36
|
#Select with instance id if present. Used where mulitple deployments are done.
|
37
37
|
if zuora_instance_id.present?
|
38
|
-
appinstances = ZuoraConnect::AppInstance.where("zuora_entity_ids ?& array[:entities] = true AND zuora_domain = :host AND id = :id", entities: [zuora_entity_id], host: zuora_host, id: zuora_instance_id)
|
38
|
+
appinstances = ZuoraConnect::AppInstance.where("zuora_entity_ids ?& array[:entities] = true AND zuora_domain = :host AND id = :id", entities: [zuora_entity_id], host: zuora_host, id: zuora_instance_id.to_i)
|
39
39
|
else
|
40
40
|
appinstances = ZuoraConnect::AppInstance.where("zuora_entity_ids ?& array[:entities] = true AND zuora_domain = :host", entities: [zuora_entity_id], host: zuora_host)
|
41
41
|
end
|
@@ -119,7 +119,7 @@ module ZuoraConnect
|
|
119
119
|
end
|
120
120
|
|
121
121
|
begin
|
122
|
-
zuora_instance_id = params[:sidebar_launch].to_s.to_bool ? nil : (params[:app_instance_id] || session["appInstance"])
|
122
|
+
zuora_instance_id = params[:sidebar_launch].to_s.to_bool ? nil : (params[:app_instance_id] || session["appInstance"])
|
123
123
|
|
124
124
|
#Identity blank or current entity different
|
125
125
|
different_zsession = session["ZSession"] != cookies['ZSession']
|
@@ -143,7 +143,7 @@ module ZuoraConnect
|
|
143
143
|
|
144
144
|
#Find matching app instances.
|
145
145
|
if zuora_instance_id.present?
|
146
|
-
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)
|
146
|
+
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.to_i).pluck(:id, :name)
|
147
147
|
else
|
148
148
|
#if app_instance_ids is present then permissions still controlled by connect
|
149
149
|
if params[:app_instance_ids].present?
|