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: b4ef5785c65d1716ad492175066157cca6cc97f04237469f7e985e2d8c56f127
4
- data.tar.gz: 4bddd005e38fdb052f14e5719f36082a0bf586ddd53facfa8d5c4fe65764f969
3
+ metadata.gz: 88e407d0338daf55ef54d679e31e24fe20207302baf36ce02610d0866f430e75
4
+ data.tar.gz: a7cbb416e61808e2438c1de65492f38ad23ef201000f486bee69329c91482459
5
5
  SHA512:
6
- metadata.gz: 44d4393dc0e0af6a1164ea7e82bd77a98ffb3dad1be8f10b813d9c912a7724e05f7879cd87604d857bbe6bd1f26e4cb8343873f8a64abed17eb9908931e4e205
7
- data.tar.gz: 97b8cfc082d665224dd2063438ee3ba785473dc735449fb8a93378ae64a1694e5c3d46cc95774a9c0e1564063fa2d86e6a710ceea4374b875625cbee45529417
6
+ metadata.gz: 5d220ae8c3b4fb197de436a193b9465c13062406665ce1a0cc052cc4207727384f72c0638727a31a86eb306e47da6ffd5a5b5f42c6eaea8ceca54760e8b7f66f
7
+ data.tar.gz: 5c051665949d76218d84d7597d907ea26767f44573da36b504a48d01c5773c04204fc6bdf28e935d3bdb5a2bc5feba0bb753d6d2971de12477bbe7d8a65b0ffd
@@ -60,7 +60,7 @@
60
60
  </style>
61
61
  </head>
62
62
 
63
- <body>
63
+ <body style='background: white;'>
64
64
  <div class="dialog">
65
65
  <div>
66
66
  <h1>Please select the instance you would like to launch.</h1>
@@ -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
- 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)
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
- end
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]))
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "2.0.3e"
2
+ VERSION = "2.0.3f"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3e
4
+ version: 2.0.3f
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team