tramway-api 1.8.6.7 → 1.8.6.8
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7afaf17fee7b310b01015af00a05f9d8105bab57ee5c8f2582513088bf07a134
|
|
4
|
+
data.tar.gz: 10ccdf3863f5cd527bc5e007e39d2b5512cda862b668d64202583a58a1a01ac4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 60433f37641ba07db8bbd32a55c318a0578df5fe92f5fb77b458a043c4e26b384772dcc744ed11d537a9cb72e8cb9f4f1b13e5cf85246f82f2a9ae33ebcfe311
|
|
7
|
+
data.tar.gz: 2ee8ae129c4165fe3ef452a63aea87b00b6115e30f9091adf34ac2f9552b2fbefbb78a68f00cbab2d54a0dc04587938a08f30364950b55d94c9468b329f00764
|
|
@@ -72,7 +72,7 @@ module Tramway
|
|
|
72
72
|
action_is_available = checking_roles.map do |role|
|
|
73
73
|
Tramway::Api.action_is_available(
|
|
74
74
|
action: action_name.to_sym,
|
|
75
|
-
project: (@application_engine ||
|
|
75
|
+
project: (@application_engine || application_name),
|
|
76
76
|
role: role,
|
|
77
77
|
model_name: params[:model],
|
|
78
78
|
current_user: current_user
|
|
@@ -93,7 +93,7 @@ module Tramway
|
|
|
93
93
|
def authenticate_user_if_needed
|
|
94
94
|
action_is_open = Tramway::Api.action_is_available(
|
|
95
95
|
action: action_name.to_sym,
|
|
96
|
-
project: (@application_engine ||
|
|
96
|
+
project: (@application_engine || application_name),
|
|
97
97
|
model_name: params[:model]
|
|
98
98
|
)
|
|
99
99
|
head(:unauthorized) && return if !current_user && !action_is_open
|
|
@@ -111,6 +111,10 @@ module Tramway
|
|
|
111
111
|
|
|
112
112
|
protected
|
|
113
113
|
|
|
114
|
+
def application_name
|
|
115
|
+
@application.present? ? @application.name : raise('Tramway::Api @application not initialized')
|
|
116
|
+
end
|
|
117
|
+
|
|
114
118
|
def model_class
|
|
115
119
|
params[:model].constantize
|
|
116
120
|
rescue ActiveSupport::Concern::MultipleIncludedBlocks => e
|
data/lib/tramway/api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tramway-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.8.6.
|
|
4
|
+
version: 1.8.6.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pavel Kalashnikov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-03-
|
|
11
|
+
date: 2021-03-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: active_model_serializers
|