zuora_connect 2.0.5i → 2.0.5j
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbafede62919e3f622f20c13bb1e0802ac393309711bf00378ecf321be914905
|
4
|
+
data.tar.gz: 7646b9dcc1fb9092eaaa2c558e9b671120660c87b3d8325e67c3397701f30837
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8de9408bf5c4d847eec783ef81f94dc683fa48e9d2ce648381969c4197a8e168a370a19b161a929fb5413047fb761ad9a4d593cd8e7f1d10797389b9a1fbc730
|
7
|
+
data.tar.gz: 2dfcccbe85c7237145d78ca8b94d40f59ae7e66e228a552e948291e105fced61989cd852041990a6e6a68f9493198ce79808f5206b7467b4d58d54916974e07c
|
@@ -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
|