プロジェクト

全般

プロフィール

Vote #76675

完了

Activate sudo mode after password based login

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

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

0%

予定工数:
category_id:
7
version_id:
102
issue_org_id:
20589
author_id:
40856
assigned_to_id:
1
comments:
5
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

We found that users get confused / annoyed when they just logged in and sudo mode requires their password again if they wanted to perform some administrative action.

Therefore this patch activates the sudo mode for the configured time span if the user logged in using username/password.


journals

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

--------------------------------------------------------------------------------
Agreed, but the patch doesn't work for me. I guess that's because #successful_authentication resets the session just after. The call to #update_sudo_timestamp! should be moved just after, right?

This also breaks pretty much all the tests from SudoModeTest and we can not reset the session sudo timestamp from within integration tests, any solution?
--------------------------------------------------------------------------------
You're right, it belongs after that.

Sorry for the sloppy patch. I attached a new one that also fixes the tests (by advancing the time using Rails' @travel_to@ test helper) and adds a new test to check wether sudo mode is active after log in.
--------------------------------------------------------------------------------
Brilliant, thanks. Committed in r14635.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリAccounts / authentication_7 にセット
  • 対象バージョン3.2.0_102 にセット

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

いいね!0
いいね!0