将登录默认值改为自动登录

This commit is contained in:
guange 2015-04-22 12:42:22 +08:00
parent 0de5ddd14c
commit d2dd77612b
2 changed files with 2 additions and 2 deletions

View File

@ -332,7 +332,7 @@ class AccountController < ApplicationController
token = Token.create(:user => user, :action => 'autologin')
cookie_options = {
:value => token.value,
:expires => 1.year.from_now,
:expires => 7.days.from_now,
:path => (Redmine::Configuration['autologin_cookie_path'] || '/'),
:secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false),
:httponly => true

View File

@ -68,7 +68,7 @@
<td align="left">
<% if Setting.autologin? %>
<label for="autologin">
<%= check_box_tag 'autologin', 1, false, :tabindex => 4 %>
<%= check_box_tag 'autologin', 1, true, :tabindex => 4 %>
<%= l(:label_stay_logged_in) %>
</label>
<% end %>