zuora_connect 1.4.28 → 1.4.29
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: 404f1adee2a5838e65df0dd9567114a0573c55ed
|
4
|
+
data.tar.gz: 81a739f09d4dbc083775dc612424749a1f731077
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4641aca86fa7f455f97b69f8e943f91b1eff4933ac2c7177d4fd118516f62fc96d6f3f611db74fc31570f11686fc5816040d6bf537390d5dce250a7223a3d3b
|
7
|
+
data.tar.gz: 8a730e74afed468cb7f33130a2fd6b1a9f58b2e8dfec8518f5493662ca57c8b4474ac77b5377f3bbe62de055470732c00066a14c3cdb8818a4c54f9b38ab9ee7
|
@@ -271,6 +271,7 @@ module ZuoraConnect
|
|
271
271
|
@username = username
|
272
272
|
@password = password
|
273
273
|
@last_refresh = session["#{self.id}::last_refresh"]
|
274
|
+
PaperTrail.whodunnit = "Backend" if defined?(PaperTrail)
|
274
275
|
|
275
276
|
## DEV MODE TASK DATA MOCKUP
|
276
277
|
if ZuoraConnect.configuration.mode != "Production"
|
@@ -6,7 +6,6 @@ module ZuoraConnect
|
|
6
6
|
|
7
7
|
def authenticate_app_api_request
|
8
8
|
start_time = Time.now
|
9
|
-
PaperTrail.whodunnit = "API User" if defined?(PaperTrail)
|
10
9
|
if !request.headers["API-Token"].blank?
|
11
10
|
@appinstance = ZuoraConnect::AppInstance.where(:api_token => request.headers["API-Token"]).first
|
12
11
|
Rails.logger.debug("[#{@appinstance.id}] API REQUEST - API token") if !@appinstance.blank?
|
@@ -36,7 +35,7 @@ module ZuoraConnect
|
|
36
35
|
#Call .data_lookup with the current session to retrieve session. In some cases session may be stored/cache in redis
|
37
36
|
#so data lookup provides a model method that can be overriden per app.
|
38
37
|
@appinstance.new_session(:session => @appinstance.data_lookup(:session => session))
|
39
|
-
PaperTrail.whodunnit =
|
38
|
+
PaperTrail.whodunnit = session["#{@appinstance.id}::user::email"] if defined?(PaperTrail) && session["#{@appinstance.id}::user::email"].present?
|
40
39
|
I18n.locale = session["#{@appinstance.id}::user::locale"] ? session["#{@appinstance.id}::user::locale"] : @appinstance.locale
|
41
40
|
Time.zone = session["#{@appinstance.id}::user::timezone"] ? session["#{@appinstance.id}::user::timezone"] : @appinstance.timezone
|
42
41
|
Rails.logger.debug("[#{@appinstance.blank? ? "N/A" : @appinstance.id}] Authenticate App Request Completed In - #{(Time.now - start_time).round(2)}s")
|
@@ -114,10 +113,12 @@ module ZuoraConnect
|
|
114
113
|
session["#{@appinstance.id}::admin"] = ZuoraConnect.configuration.dev_mode_admin
|
115
114
|
end
|
116
115
|
|
116
|
+
#API ONLY
|
117
117
|
def check_instance
|
118
118
|
if !@appinstance.blank?
|
119
119
|
@appinstance.new_session(:session => @appinstance.data_lookup(:session => session))
|
120
120
|
Thread.current[:appinstance] = @appinstance
|
121
|
+
PaperTrail.whodunnit = "API User" if defined?(PaperTrail)
|
121
122
|
return @appinstance.valid
|
122
123
|
else
|
123
124
|
render text: "Access Denied", status: :unauthorized
|