diff options
author | Eric Maziade <eric.maziade@novisoft.com> | 2015-06-05 11:50:37 -0400 |
---|---|---|
committer | Eric Maziade <eric.maziade@novisoft.com> | 2015-06-05 11:50:37 -0400 |
commit | 84a414fe534ebb60c8e7396c245486be521e2a11 (patch) | |
tree | 35880b0bf1bdd1ba5818bbea464e86c7391f2407 /config | |
parent | 971e57cffa6a89ebcd4da83efc4967f834f8f58b (diff) | |
download | gitlab-ce-84a414fe534ebb60c8e7396c245486be521e2a11.tar.gz |
Add session expiration delay configuration through UI application
settings
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/1_settings.rb | 1 | ||||
-rw-r--r-- | config/initializers/session_store.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index c234bd69e9a..9b39dff046e 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -128,6 +128,7 @@ Settings.gitlab['issue_closing_pattern'] = '((?:[Cc]los(?:e[sd]?|ing)|[Ff]ix(?:e Settings.gitlab['default_projects_features'] ||= {} Settings.gitlab['webhook_timeout'] ||= 10 Settings.gitlab['max_attachment_size'] ||= 10 +Settings.gitlab['session_expire_seconds'] ||= 604800 Settings.gitlab.default_projects_features['issues'] = true if Settings.gitlab.default_projects_features['issues'].nil? Settings.gitlab.default_projects_features['merge_requests'] = true if Settings.gitlab.default_projects_features['merge_requests'].nil? Settings.gitlab.default_projects_features['wiki'] = true if Settings.gitlab.default_projects_features['wiki'].nil? diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index b2d59f1c4b7..1603f7561cd 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -6,6 +6,6 @@ Gitlab::Application.config.session_store( key: '_gitlab_session', secure: Gitlab.config.gitlab.https, httponly: true, - expire_after: 1.week, + expire_after: ActiveRecord::Base.connected? && ActiveRecord::Base.connection.table_exists?('application_settings') ? ApplicationSetting.current.session_expire_seconds : Settings.gitlab['session_expire_seconds'], path: (Rails.application.config.relative_url_root.nil?) ? '/' : Rails.application.config.relative_url_root ) |