プロジェクト

全般

プロフィール

Vote #74553

未完了

A popup message after session timeout

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Accounts / authentication_7
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
7
version_id:
0
issue_org_id:
15234
author_id:
12557
assigned_to_id:
0
comments:
3
status_id:
1
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

When the session timeout is set and a user leaves an unsaved form for a while so their session expires and clicks on the Save button, they is redirected to the login page and all unsaved data from the form just being edited are lost.

The same frustrating situation can happend when you write a long wiki page.

The flash message on the login page does't help to recover lost data.

I thing that the user should be warn before data are lost.

Please take into account the attached simple patch that add a Javascript popup message with the warning text about session expiration.


journals

I guess that the patch won't work if redmine is installed with a sub-URI.

Also, won't the heartbeat request reactivate the session?

--------------------------------------------------------------------------------
> I guess that the patch won't work if redmine is installed with a sub-URI.

I've removed the slash in route.rb:
<pre><code class="ruby">
-get '/session_heartbeat', :to => 'application#session_heartbeat'
+get 'session_heartbeat', :to => 'application#session_heartbeat'
</code></pre>

> Also, won't the heartbeat request reactivate the session?

I don't think so. I skip the reactivation in session_expiration method:
<pre><code class="ruby">
def session_expiration
+ # Skip session heartbeat
+ return if ((params[:controller] == 'application') && (params[:action] = 'session_heartbeat'))
</code></pre>

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,New,10569,Save user data on invalid form authenticity token

Admin Redmine さんがほぼ2年前に更新

  • カテゴリAccounts / authentication_7 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0