projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8d673fa
)
add selfservice-session_timeout config
author
ivan
<ivan>
Thu, 8 Nov 2007 04:21:29 +0000
(
04:21
+0000)
committer
ivan
<ivan>
Thu, 8 Nov 2007 04:21:29 +0000
(
04:21
+0000)
FS/FS/ClientAPI/MyAccount.pm
patch
|
blob
|
history
FS/FS/Conf.pm
patch
|
blob
|
history
diff --git
a/FS/FS/ClientAPI/MyAccount.pm
b/FS/FS/ClientAPI/MyAccount.pm
index
058c0b8
..
b42a91e
100644
(file)
--- a/
FS/FS/ClientAPI/MyAccount.pm
+++ b/
FS/FS/ClientAPI/MyAccount.pm
@@
-88,7
+88,8
@@
sub login {
$session_id = md5_hex(md5_hex(time(). {}. rand(). $$))
} until ( ! defined _cache->get($session_id) ); #just in case
$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,
return { 'error' => '',
'session_id' => $session_id,
diff --git
a/FS/FS/Conf.pm
b/FS/FS/Conf.pm
index
ed05811
..
030799a
100644
(file)
--- a/
FS/FS/Conf.pm
+++ b/
FS/FS/Conf.pm
@@
-2018,6
+2018,14
@@
worry that config_items is freeside-specific and icky.
},
{
},
{
+ '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',
'description' => 'Disables charging of setup fees for suspended packages.',
'key' => 'disable_setup_suspended_pkgs',
'section' => 'billing',
'description' => 'Disables charging of setup fees for suspended packages.',