From db1ee56f0601a775332dfce59ad9273a8149c391 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 16 Jan 2008 08:39:56 +0000 Subject: [PATCH] =?utf8?q?Admininterface:=20Wenn=20eine=20g=C3=BCltige=20S?= =?utf8?q?ession=20mit=20g=C3=BCltigem=20Admin-Passwort=20vorliegt,=20dann?= =?utf8?q?=20gleich=20die=20Benutzerliste=20anzeigen,=20wenn=20die=20Admin?= =?utf8?q?-URL=20ohne=20weitere=20Parameter=20aufgerufen=20wird.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/admin.pl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index a6200bad2..6af37b3de 100644 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -78,10 +78,7 @@ $form->{stylesheet} = "lx-office-erp.css"; $form->{favicon} = "favicon.ico"; if ($form->{action}) { - - $subroutine = $locale->findsub($form->{action}); - - if ($auth->authenticate_root($form->{rpw}, 0)) { + if ($auth->authenticate_root($form->{rpw}, 0) != Auth::OK) { $form->{error_message} = $locale->text('Incorrect Password!'); adminlogin(); exit; @@ -89,10 +86,15 @@ if ($form->{action}) { $auth->create_or_refresh_session() if ($auth->session_tables_present()); - call_sub($subroutine); + call_sub($locale->findsub($form->{action})); -} else { +} elsif ($auth->authenticate_root($form->{rpw}, 0) == Auth::OK) { + + $auth->create_or_refresh_session() if ($auth->session_tables_present()); + + login(); +} else { # if there are no drivers bail out $form->error($locale->text('No Database Drivers available!')) unless (User->dbdrivers); -- 2.20.1