From: ivan Date: Thu, 8 Nov 2007 04:21:34 +0000 (+0000) Subject: add selfservice-session_timeout config X-Git-Tag: freeside_1_7_3rc1~272 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=5b77b091deb130c5227f28cbb845507353fb715a;p=freeside.git add selfservice-session_timeout config --- diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index c9ab5bf7e..e22043797 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -87,7 +87,8 @@ sub login { $session_id = md5_hex(md5_hex(time(). {}. rand(). $$)) } until ( ! defined _cache->get($session_id) ); #just in case - _cache->set( $session_id, $session, '1 hour' ); + my $timeout = $conf->config('selfservice-session_timeout') || '1 hour'; + _cache->set( $session_id, $session, $timeout ); return { 'error' => '', 'session_id' => $session_id, diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index eab417c19..56f60d59e 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2089,6 +2089,14 @@ worry that config_items is freeside-specific and icky. 'type' => 'textarea', }, + { + 'key' => 'selfservice-session_timeout', + 'section' => '', + 'description' => 'Self-service session timeout. Defaults to 1 hour.', + 'type' => 'select', + 'select_enum' => [ '1 hour', '2 hours', '4 hours', '8 hours', '1 day', '1 week', ], + }, + { 'key' => 'disable_setup_suspended_pkgs', 'section' => 'billing',