Project

General

Profile

Actions

Defect #6438

closed

Autologin cannot be disabled again once it's enabled

Added by Anonymous about 14 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Low
Category:
Administration
Target version:
Start date:
2010-09-20
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

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

Actions #1

Updated by Felix Schäfer about 14 years ago

  • Target version set to 1.0.3

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:

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"],
Actions #2

Updated by Anonymous about 14 years ago

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.

Actions #3

Updated by Jean-Baptiste Barth about 14 years ago

  • Status changed from New to Resolved
  • Resolution set to Fixed

Applied in r4306, thanks.

Actions #4

Updated by Eric Davis almost 14 years ago

  • Status changed from Resolved to Closed

Merged into 1.0-stable for release in 1.0.3

Actions

Also available in: Atom PDF