プロジェクト

全般

プロフィール

Vote #68169

完了

Autologin cannot be disabled again once it's enabled

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

ステータス:
Closed
優先度:
低め
担当者:
-
カテゴリ:
Administration_8
対象バージョン:
開始日:
2010/09/20
期日:
進捗率:

0%

予定工数:
category_id:
8
version_id:
25
issue_org_id:
6438
author_id:
4
assigned_to_id:
3866
comments:
4
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
21
ステータス-->[Closed]

説明

We have enabled the AutoLogin feature so that people don't have to enter their credentials each time they go to Redmine. When playing with it, I realized that it cannot be deactivated again. It save the settings page without giving any error but does not change the field. I also checked and it really is not deactivated.

It is possible to change the lease time though.

See also "this discussion":http://www.redmine.org/boards/2/topics/17319?r=17480#message-17480


journals

JB, Eric: the commit for this is here: http://github.com/thegcat/redmine/commit/7ab0baa96a93f0c50d0bc99cefcb52e6fdcba1f4

The change is small: it forces the select list to return @0@ instead of @''@ for "autologin disabled". The problem with having an empty string returned for @autologin@ is that @autologin@ is defined as an @int@ in the settings and thus checked for numericality, which fails for the empty string.

Jan, if you feel up to applying a patch to your installation, here's the diff:

<pre><code class="diff">diff --git a/app/views/settings/_authentication.rhtml b/app/views/settings/_authentication.rhtml
index da29bb7..1122053 100644
--- a/app/views/settings/_authentication.rhtml
+++ b/app/views/settings/_authentication.rhtml
@@ -3,7 +3,7 @@
<div class="box tabular settings">
<p><%= setting_check_box :login_required %></p>

-<p><%= setting_select :autologin, [1, 7, 30, 365].collect{|days| [l('datetime.distance_in_words.x_days', :count => days), days.to_s]}, :blank => :label_disabled %></p>
+<p><%= setting_select :autologin, [[l(:label_disabled), 0]] + [1, 7, 30, 365].collect{|days| [l('datetime.distance_in_words.x_days', :count => days), days.to_s]} %></p>

<p><%= setting_select :self_registration, [[l(:label_disabled), "0"],
[l(:label_registration_activation_by_email), "1"],</code></pre>
--------------------------------------------------------------------------------
Many thanks for your efforts! I will wait for that version, it's not really a work hindering bug, I just noticed it and thought it might be worth reporting. Thanks for being so superquick.
--------------------------------------------------------------------------------
Applied in r4306, thanks.
--------------------------------------------------------------------------------
Merged into 1.0-stable for release in 1.0.3
--------------------------------------------------------------------------------

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

  • カテゴリAdministration_8 にセット
  • 対象バージョン1.0.3_25 にセット

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

いいね!0
いいね!0