Skip to content

Commit

Permalink
Merge pull request #257 from UPC/246_timeout
Browse files Browse the repository at this point in the history
246 timeout
  • Loading branch information
frankiejol committed May 31, 2017
2 parents 085dd8a + 37fd2f6 commit da21bcc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bin/rvd_back.pl
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ sub change_password {
chomp $login;
return if !$login;

my $ravada = Ravada->new(config => $FILE_CONFIG);
my $ravada = Ravada->new( config => $FILE_CONFIG );

my $user = Ravada::Auth::SQL->new(name => $login);
die "ERROR: Unknown user '$login'\n" if !$user->id;

Expand Down
2 changes: 2 additions & 0 deletions etc/rvd_front.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
,group => 'ravada'
,secrets => ['changeme1','changeme2']
,login_custom => ''
,session_timeout => 5*60
,session_timeout_admin => 15*60
};
5 changes: 2 additions & 3 deletions rvd_front.pl
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@
our $DOCUMENT_ROOT = "/var/www";

# session times out in 5 minutes
our $SESSION_TIMEOUT = 5 * 60;
our $SESSION_TIMEOUT = ($CONFIG_FRONT->{session_timeout} or 5 * 60);
# session times out in 15 minutes for admin users
our $SESSION_TIMEOUT_ADMIN = 15 * 60;
our $SESSION_TIMEOUT_ADMIN = ($CONFIG_FRONT->{session_timeout_admin} or 15 * 60);

init();
############################################################################3
Expand Down Expand Up @@ -805,7 +805,6 @@ sub quick_start_domain {

return show_failure($c, $domain_name) if !$domain;

$c->session(expiration => 60) if !$USER->is_admin;
return show_link($c,$domain);

}
Expand Down

0 comments on commit da21bcc

Please sign in to comment.