Merge branch 'guange_dev' into develop
This commit is contained in:
commit
6c67b829c5
|
@ -336,9 +336,11 @@ class AccountController < ApplicationController
|
|||
:expires => 1.month.from_now,
|
||||
:path => (Redmine::Configuration['autologin_cookie_path'] || '/'),
|
||||
:secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false),
|
||||
:domain => Redmine::Configuration['cookie_domain'],
|
||||
:httponly => true
|
||||
}
|
||||
if Redmine::Configuration['cookie_domain'].present?
|
||||
cookie_options = cookie_options.merge(domain: Redmine::Configuration['cookie_domain'])
|
||||
end
|
||||
cookies[autologin_cookie_name] = cookie_options
|
||||
end
|
||||
|
||||
|
|
|
@ -199,7 +199,11 @@ class ApplicationController < ActionController::Base
|
|||
# Logs out current user
|
||||
def logout_user
|
||||
if User.current.logged?
|
||||
cookies.delete(autologin_cookie_name, domain: :all)
|
||||
if Redmine::Configuration['cookie_domain'].present?
|
||||
cookies.delete(autologin_cookie_name, domain: Redmine::Configuration['cookie_domain'])
|
||||
else
|
||||
cookies.delete autologin_cookie_name
|
||||
end
|
||||
# Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin'])
|
||||
self.logged_user = nil
|
||||
end
|
||||
|
|
|
@ -90,7 +90,6 @@ default:
|
|||
user_name: "huang.jingquan@163.com"
|
||||
password: 'xinhu1ji2qu366'
|
||||
|
||||
cookie_domain: ".trustie.net"
|
||||
# Absolute path to the directory where attachments are stored.
|
||||
# The default is the 'files' directory in your Redmine instance.
|
||||
# Your Redmine instance needs to have write permission on this
|
||||
|
@ -104,7 +103,7 @@ default:
|
|||
# autologin_cookie_name: the name of the cookie (default: autologin)
|
||||
# autologin_cookie_path: the cookie path (default: /)
|
||||
# autologin_cookie_secure: true sets the cookie secure flag (default: false)
|
||||
autologin_cookie_name:
|
||||
autologin_cookie_name: "autologin_trustie"
|
||||
autologin_cookie_path:
|
||||
autologin_cookie_secure:
|
||||
|
||||
|
@ -201,7 +200,7 @@ default:
|
|||
# specific configuration options for production environment
|
||||
# that overrides the default ones
|
||||
production:
|
||||
# CJK support
|
||||
cookie_domain: ".trustie.net"
|
||||
rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
|
||||
email_delivery:
|
||||
delivery_method: :smtp
|
||||
|
|
Loading…
Reference in New Issue