From a09455275f319514bc547b73113917151c6a97ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 21 Apr 2011 12:30:43 +0200 Subject: [PATCH] =?utf8?q?$::auth=20nicht=20l=C3=B6schen=20sondern=20nur?= =?utf8?q?=20resetten.=20(Experimentell)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Auth.pm | 9 +++++++++ SL/Dispatcher.pm | 5 ++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/SL/Auth.pm b/SL/Auth.pm index 978fe497d..3b14def5d 100644 --- a/SL/Auth.pm +++ b/SL/Auth.pm @@ -36,6 +36,15 @@ sub new { return $self; } +sub reset { + my ($self, %params) = @_; + + $self->{SESSION} = { }; + $self->{FULL_RIGHTS} = { }; + $self->{RIGHTS} = { }; + $self->{unique_counter} = 0; +} + sub get_user_dbh { my ($self, $login) = @_; my %user = $self->read_user($login); diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 3bf120668..b827acc7d 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -84,6 +84,7 @@ sub pre_startup_setup { { no warnings 'once'; $::lxdebug = LXDebug->new; + $::auth = SL::Auth->new; $::form = undef; %::myconfig = (); %::called_subs = (); # currently used for recursion detection @@ -159,7 +160,6 @@ sub handle_request { $::cgi = CGI->new(''); $::locale = Locale->new($::lx_office_conf{system}->{language}); $::form = Form->new; - $::auth = SL::Auth->new; %::called_subs = (); eval { ($routing_type, $script_name, $action) = _route_request($script_name); 1; } or return; @@ -234,8 +234,7 @@ sub handle_request { $::myconfig = (); Form::disconnect_standard_dbh; $::auth->expire_session_keys->save_session; - $::auth->dbdisconnect; - $::auth = undef; + $::auth->reset; $::lxdebug->end_request; $::lxdebug->leave_sub; -- 2.20.1