zuora_connect 2.0.5i → 2.0.5j

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: a6e24ecbe0cc46c18ae4e15f4435d97da771f745e715d4a1b6aa367074dae636
4
- data.tar.gz: 99cac202292bac967e210ded0c1cc208a32eed070adbc5d61f65daad79b6b304
3
+ metadata.gz: fbafede62919e3f622f20c13bb1e0802ac393309711bf00378ecf321be914905
4
+ data.tar.gz: 7646b9dcc1fb9092eaaa2c558e9b671120660c87b3d8325e67c3397701f30837
5
5
  SHA512:
6
- metadata.gz: ce2054e8627a6532d52c4292b832f2068483d034ec8326609641a1ea9006de4245f49104d0492933e917a3a20adafcbad3aa30cbb9806a4384179a49b8abed4c
7
- data.tar.gz: 10521535501919658c69dd7a2184dc6db7b44a4de43be4157a861be7f50d91f069fc08178c563f36897ae6e29016367cf304ebec74ad0184df3f864729dfcf36
6
+ metadata.gz: 8de9408bf5c4d847eec783ef81f94dc683fa48e9d2ce648381969c4197a8e168a370a19b161a929fb5413047fb761ad9a4d593cd8e7f1d10797389b9a1fbc730
7
+ data.tar.gz: 2dfcccbe85c7237145d78ca8b94d40f59ae7e66e228a552e948291e105fced61989cd852041990a6e6a68f9493198ce79808f5206b7467b4d58d54916974e07c
@@ -65,7 +65,7 @@
65
65
  <% elsif defined?(message) && defined?(title) %>
66
66
  <div class="dialog">
67
67
  <div><h1><%= title %></h1></div>
68
- <p><%= message %></p>
68
+ <p><%= message.html_safe %></p>
69
69
  </div>
70
70
  <% else %>
71
71
  <div class="dialog">
@@ -105,11 +105,12 @@ module ZuoraConnect
105
105
  zuora_instance_id = params[:sidebar_launch].to_bool ? nil : (params[:app_instance_id] || session["appInstance"])
106
106
 
107
107
  #Identity blank or current entity different
108
- if (session["ZuoraCurrentIdentity"].blank? || session["ZuoraCurrentEntity"] != zuora_entity_id)
108
+ if (session["ZuoraCurrentIdentity"].blank? || (session["ZuoraCurrentEntity"] != zuora_entity_id) || (session["ZSession"] != cookies['ZSession']))
109
109
  begin
110
110
  identity, response = zuora_client.rest_call(url: zuora_client.rest_endpoint("identity"))
111
111
  session["ZuoraCurrentIdentity"] = identity
112
112
  session["ZuoraCurrentEntity"] = identity['entityId']
113
+ session["ZSession"] = cookies['ZSession']
113
114
 
114
115
  begin
115
116
  client_describe, response = zuora_client.rest_call(url: zuora_client.rest_endpoint("genesis/user/info").gsub('v1/', ''), session_type: zuora_client.class == ZuoraAPI::Oauth ? :bearer : :basic, headers: zuora_client.class == ZuoraAPI::Oauth ? {} : {'Authorization' => "ZSession-a3N2w #{zuora_client.get_session(prefix: false, auth_type: :basic)}"})
@@ -169,6 +170,8 @@ module ZuoraConnect
169
170
  @zuora_user.zuora_identity_response[zuora_entity_id] = session["ZuoraCurrentIdentity"]
170
171
  @zuora_user.save!
171
172
  end
173
+
174
+ session["#{@appinstance.id}::user::email"] = session["username"]
172
175
  else
173
176
  ZuoraConnect.logger.debug("New zuora user object for #{zuora_user_id}")
174
177
  @zuora_user = ZuoraConnect::ZuoraUser.create!(:zuora_user_id => zuora_user_id, :zuora_identity_response => {zuora_entity_id => session["ZuoraCurrentIdentity"]})
@@ -318,6 +321,10 @@ module ZuoraConnect
318
321
  return @zuora_user
319
322
  end
320
323
 
324
+ def hallway_integration?
325
+ return (request.headers['ZuoraCurrentEntity'].present? || cookies['ZuoraCurrentEntity'].present?)
326
+ end
327
+
321
328
  private
322
329
  def setup_instance_via_data
323
330
  session.clear
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "2.0.5i"
2
+ VERSION = "2.0.5j"
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.5i
4
+ version: 2.0.5j
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team