glib-web 4.35.4 → 4.35.5
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 +4 -4
- data/app/controllers/concerns/glib/json/libs.rb +18 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd64c82e1baa6874b8791fdc0a330916a9463e92145a5e7c8ac3a6b64ef271dd
|
4
|
+
data.tar.gz: 85ea472517490fd0d2fc572531869964240111df12d2e93b9fc35a569ece071d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cfd05eee3620fc4177e75f7e5f43904e1560084979aad3bc522beb837afc45e86b47f766feb2ada4b69d4f20a14b236907f04e4072968316d7b2b99100fdebe
|
7
|
+
data.tar.gz: 1afe10ae33a3688b85be1cd1f966ff8bd01d60eaca51fb3602d4d1c8d52b6276701371f455758d488248c1ea344c8e019e6c2b61878dcd5ea88be52725c15dd2
|
@@ -68,10 +68,10 @@ module Glib::Json::Libs
|
|
68
68
|
|
69
69
|
# As much as possible, try retaining the front fragment by matching the back, because
|
70
70
|
# the front could be either a `?` or `&`
|
71
|
-
url = url.sub(/format=json\&/, '')
|
71
|
+
url = url.sub(/format=json\&/, '')
|
72
72
|
|
73
73
|
# If no match, then we replace the front fragment
|
74
|
-
url.sub(/[\&\?]format=json/, '')
|
74
|
+
url.sub(/[\&\?]format=json/, '')
|
75
75
|
end
|
76
76
|
|
77
77
|
def glib_redirect_to(url, return_to_previous: false, status: :ok)
|
@@ -87,6 +87,13 @@ module Glib::Json::Libs
|
|
87
87
|
return
|
88
88
|
end
|
89
89
|
|
90
|
+
# Inside a dialog, it's easier to simply use HTTP redirect, as opposed to trying to
|
91
|
+
# get the dialog to perform manual redirection.
|
92
|
+
if glib_json_dialog_mode?
|
93
|
+
redirect_to url
|
94
|
+
return
|
95
|
+
end
|
96
|
+
|
90
97
|
json_ui_redirect_to url, status: status
|
91
98
|
end
|
92
99
|
end
|
@@ -152,14 +159,14 @@ module Glib::Json::Libs
|
|
152
159
|
end
|
153
160
|
|
154
161
|
render json: if glib_json_dialog_mode?
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
162
|
+
{ onLoad: __glib_error_dialog('Access denied', "Make sure you're logged in with the correct account.") }
|
163
|
+
else
|
164
|
+
{
|
165
|
+
onResponse: {
|
166
|
+
action: 'windows/open', url: user_default_url
|
167
|
+
}
|
168
|
+
}
|
169
|
+
end, status: Rails.env.test? ? :forbidden : :ok
|
163
170
|
end
|
164
171
|
format.csv do
|
165
172
|
if Rails.env.test?
|
@@ -229,7 +236,7 @@ module Glib::Json::Libs
|
|
229
236
|
if json_ui_activated?
|
230
237
|
if Rails.env.production? || preview_mode
|
231
238
|
if defined?(Rollbar) && !preview_mode
|
232
|
-
Rollbar.error(exception, :
|
239
|
+
Rollbar.error(exception, use_exception_level_filters: true)
|
233
240
|
end
|
234
241
|
|
235
242
|
render file: Rails.root.join('public', '500.html'), status: :internal_server_error
|