Vote #68169
完了Autologin cannot be disabled again once it's enabled
0%
説明
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
--------------------------------------------------------------------------------