14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'app/controllers/concerns/glib/auth/response.rb', line 14
def json_ui_401_response(sign_in_url, **redirect_options)
allow_other_host = redirect_options[:allow_other_host]
{
glib_json_dialog_mode? ? :onLoad : :onResponse => __glib_error_dialog(
'Your session has ended', 'Please re-login.', ['dialog-401-error'], [
{
view: 'button',
text: 'Re-login',
onClick: {
action: 'dialogs/close',
onClose: {
action: allow_other_host ? 'windows/openWeb' : 'windows/open',
url: sign_in_url,
targetWindow: allow_other_host ? '_self' : nil
}
}
},
])
}
end
|