diff options
author | Stan Hu <stanhu@gmail.com> | 2015-08-28 10:55:51 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-08-28 10:55:51 +0300 |
commit | a429eb4d455cabde26c5cdf8a3b38e65966531dc (patch) | |
tree | 35100c171aa4528a66725b4b3c58cac1d76b356c | |
parent | 53698401fb15d7e69514bb48217711d060fd9e46 (diff) | |
parent | 23aee0ca8ad3de5697f770696f3e55fbfdba2be8 (diff) |
Merge branch 'fix-session_expire_delay' into 'master'
read session_expire_delay from database if table & column exists;
Previous code only ends up using the default value for session_expire_delay, not the value stored in the database, making the session always 1 week.
See merge request !1217
-rw-r--r-- | lib/gitlab/current_settings.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb index 1a2a50a14d0..7ad3ed8728f 100644 --- a/lib/gitlab/current_settings.rb +++ b/lib/gitlab/current_settings.rb @@ -4,7 +4,7 @@ module Gitlab key = :current_application_settings RequestStore.store[key] ||= begin - if ActiveRecord::Base.connected? && ActiveRecord::Base.connection.table_exists?('application_settings') + if ActiveRecord::Base.connection.active? && ActiveRecord::Base.connection.table_exists?('application_settings') ApplicationSetting.current || ApplicationSetting.create_from_defaults else fake_application_settings |