zuora_connect 1.7.41 → 1.7.42
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9abaf525d1e36123a8e0cdad0f7b637851ae36e0
|
4
|
+
data.tar.gz: d1d46c60b201c79715a238aec1fd0c91f953b3a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46848f66a1c384e1185a18ffdfffea1bcd967bea19d5bdd4d1423dd948f94f0eb48d3ff39befbd9fed3e22d9193d497605aaa5dcf033e4a2c14ffe468cb46566
|
7
|
+
data.tar.gz: a6b35088ce8b0fcd6487ccc7b50e46cc1cfe90315ccfc7433e07c8c5829103fa1bd0625ddbec49432b0b35f70a0197627e3ae4d7b840ae8a10e0a7b60e13674e
|
@@ -1,7 +1,9 @@
|
|
1
1
|
module ZuoraConnect
|
2
2
|
class StaticController < ApplicationController
|
3
3
|
before_filter :authenticate_connect_app_request, :except => [:metrics, :health, :session_error, :invalid_app_instance_error, :initialize_app]
|
4
|
-
|
4
|
+
before_filter :clear_connect_app_session, :only => [:metrics, :health, :session_error, :invalid_app_instance_error, :initialize_app]
|
5
|
+
after_filter :persist_connect_app_session, :except => [:metrics, :health, :session_error, :invalid_app_instance_error, :initialize_app]
|
6
|
+
|
5
7
|
skip_before_filter :verify_authenticity_token, :only => [:initialize_app]
|
6
8
|
|
7
9
|
def session_error
|
@@ -45,5 +47,12 @@ module ZuoraConnect
|
|
45
47
|
end
|
46
48
|
end
|
47
49
|
|
50
|
+
private
|
51
|
+
|
52
|
+
def clear_connect_app_session
|
53
|
+
Thread.current[:appinstance] = nil
|
54
|
+
request.session_options[:skip] = true
|
55
|
+
end
|
56
|
+
|
48
57
|
end
|
49
58
|
end
|
@@ -20,6 +20,11 @@ module ZuoraConnect
|
|
20
20
|
self.attr_builder("timezone", ZuoraConnect.configuration.default_time_zone)
|
21
21
|
self.attr_builder("locale", ZuoraConnect.configuration.default_locale)
|
22
22
|
PaperTrail.whodunnit = "Backend" if defined?(PaperTrail)
|
23
|
+
if defined?(ElasticAPM)
|
24
|
+
ElasticAPM.set_user("Backend")
|
25
|
+
ElasticAPM.set_tag(:app_instance, self.id)
|
26
|
+
end
|
27
|
+
|
23
28
|
if INSTANCE_REFRESH_WINDOW > INSTANCE_REDIS_CACHE_PERIOD
|
24
29
|
raise "The instance refresh window cannot be greater than the instance cache period"
|
25
30
|
end
|
@@ -46,6 +51,7 @@ module ZuoraConnect
|
|
46
51
|
self.last_refresh = session["#{self.id}::last_refresh"]
|
47
52
|
self.connect_user = session["#{self.id}::user::email"] if session["#{self.id}::user::email"].present?
|
48
53
|
PaperTrail.whodunnit = self.connect_user if defined?(PaperTrail)
|
54
|
+
ElasticAPM.set_user(self.connect_user) if defined?(ElasticAPM)
|
49
55
|
recoverable_session = false
|
50
56
|
|
51
57
|
## DEV MODE TASK DATA MOCKUP
|
@@ -128,7 +128,10 @@ module ZuoraConnect
|
|
128
128
|
@appinstance.new_session(:session => @appinstance.data_lookup(:session => session))
|
129
129
|
end
|
130
130
|
end
|
131
|
-
|
131
|
+
if session["#{@appinstance.id}::user::email"].present?
|
132
|
+
ElasticAPM.set_user(session["#{@appinstance.id}::user::email"]) if defined?(ElasticAPM)
|
133
|
+
PaperTrail.whodunnit = session["#{@appinstance.id}::user::email"] if defined?(PaperTrail)
|
134
|
+
end
|
132
135
|
begin
|
133
136
|
I18n.locale = session["#{@appinstance.id}::user::locale"] ? session["#{@appinstance.id}::user::locale"] : @appinstance.locale
|
134
137
|
rescue I18n::InvalidLocale => ex
|
@@ -240,6 +243,7 @@ module ZuoraConnect
|
|
240
243
|
end
|
241
244
|
Thread.current[:appinstance] = @appinstance
|
242
245
|
PaperTrail.whodunnit = "API User" if defined?(PaperTrail)
|
246
|
+
ElasticAPM.set_user("API User") if defined?(ElasticAPM)
|
243
247
|
return true
|
244
248
|
else
|
245
249
|
render text: "Access Denied", status: :unauthorized
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zuora_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.42
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connect Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apartment
|