From 540c0b5e9a38158e6f7a6efacd20b2477efad7ac Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 17 Aug 2012 14:23:52 +0200 Subject: [PATCH] User-Login auf Controller umgestellt --- SL/Auth.pm | 16 +- SL/Controller/Base.pm | 26 +++- SL/Controller/LoginScreen.pm | 82 +++++++++++ SL/Dispatcher.pm | 29 ++-- SL/Dispatcher/AuthHandler.pm | 16 +- SL/Dispatcher/AuthHandler/Admin.pm | 3 +- SL/Dispatcher/AuthHandler/None.pm | 11 ++ SL/Dispatcher/AuthHandler/User.pm | 21 ++- bin/mozilla/admin.pl | 1 + bin/mozilla/login.pl | 137 ------------------ bin/mozilla/menujs.pl | 2 +- index.html | 4 +- locale/de/all | 1 - locale/de_DE/all | 1 - menu.ini | 4 +- templates/webpages/admin/adminlogin.html | 6 +- templates/webpages/admin/list_users.html | 5 +- templates/webpages/dbupgrade/warning.html | 4 +- .../login/authentication_pl_missing.html | 16 -- templates/webpages/login/password_error.html | 11 -- .../auth_db_needs_update.html | 2 +- .../auth_db_unreachable.html | 2 +- .../old_configuration_files.html | 2 +- .../user_login.html} | 8 +- templates/webpages/menu/header.html | 4 +- templates/webpages/menu/menunew.html | 2 +- templates/webpages/menu/menuv3.html | 2 +- templates/webpages/menu/menuv4.html | 2 +- 28 files changed, 199 insertions(+), 221 deletions(-) create mode 100644 SL/Controller/LoginScreen.pm create mode 100644 SL/Dispatcher/AuthHandler/None.pm delete mode 100644 templates/webpages/login/authentication_pl_missing.html delete mode 100644 templates/webpages/login/password_error.html rename templates/webpages/{login => login_screen}/auth_db_needs_update.html (90%) rename templates/webpages/{login => login_screen}/auth_db_unreachable.html (90%) rename templates/webpages/{login => login_screen}/old_configuration_files.html (91%) rename templates/webpages/{login/login_screen.html => login_screen/user_login.html} (82%) diff --git a/SL/Auth.pm b/SL/Auth.pm index 4c50ddf0b..ed5c84543 100644 --- a/SL/Auth.pm +++ b/SL/Auth.pm @@ -149,7 +149,7 @@ sub authenticate_root { my ($self, $password) = @_; - my $session_root_auth = $self->get_session_value(SESSION_KEY_ROOT_AUTH); + my $session_root_auth = $self->get_session_value(SESSION_KEY_ROOT_AUTH()); if (defined $session_root_auth && $session_root_auth == OK) { $::lxdebug->leave_sub; return OK; @@ -164,9 +164,7 @@ sub authenticate_root { my $admin_password = SL::Auth::Password->hash_if_unhashed(login => 'root', password => $self->{admin_password}->()); my $result = $password eq $admin_password ? OK : ERR_PASSWORD; - $self->set_session_value(SESSION_KEY_ROOT_AUTH ,=> $result); - - sleep 5 if $result != OK; + $self->set_session_value(SESSION_KEY_ROOT_AUTH() => $result); $::lxdebug->leave_sub; return $result; @@ -177,7 +175,7 @@ sub authenticate { my ($self, $login, $password) = @_; - my $session_auth = $self->get_session_value(SESSION_KEY_USER_AUTH); + my $session_auth = $self->get_session_value(SESSION_KEY_USER_AUTH()); if (defined $session_auth && $session_auth == OK) { $::lxdebug->leave_sub; return OK; @@ -189,14 +187,16 @@ sub authenticate { } my $result = $login ? $self->{authenticator}->authenticate($login, $password) : ERR_USER; - $self->set_session_value(SESSION_KEY_USER_AUTH ,=> $result, login => $login); - - sleep 5 if $result != OK; + $self->set_session_value(SESSION_KEY_USER_AUTH() => $result, login => $login); $::lxdebug->leave_sub; return $result; } +sub punish_wrong_login { + sleep 5; +} + sub get_stored_password { my ($self, $login) = @_; diff --git a/SL/Controller/Base.pm b/SL/Controller/Base.pm index 29289ff96..f99b1e722 100644 --- a/SL/Controller/Base.pm +++ b/SL/Controller/Base.pm @@ -21,11 +21,20 @@ sub url_for { my %params = ref($_[0]) eq 'HASH' ? %{ $_[0] } : @_; my $controller = delete($params{controller}) || $self->_controller_name; - my $action = delete($params{action}) || 'dispatch'; - $params{action} = "${controller}/${action}"; + my $action = $params{action} || 'dispatch'; + + my $script; + if ($controller =~ m/\.pl$/) { + # Old-style controller + $script = $controller; + } else { + $params{action} = "${controller}/${action}"; + $script = "controller.pl"; + } + my $query = join '&', map { uri_encode($_->[0]) . '=' . uri_encode($_->[1]) } @{ flatten(\%params) }; - return "controller.pl?${query}"; + return "${script}?${query}"; } sub redirect_to { @@ -172,6 +181,10 @@ sub get_auth_level { return 'user'; } +sub keep_auth_vars_in_form { + return 0; +} + # # private functions -- for use in Base only # @@ -517,6 +530,13 @@ C (authentication as a normal user suffices) with a possible future value C (which would require no authentication but is not yet implemented). +=item C + +May be overridden by a controller. If falsish (the default) all form +variables whose name starts with C<{AUTH}> are removed before the +request is routed. Only controllers that handle login requests +themselves should return trueish for this function. + =back =head2 PRIVATE FUNCTIONS diff --git a/SL/Controller/LoginScreen.pm b/SL/Controller/LoginScreen.pm new file mode 100644 index 000000000..f561a394b --- /dev/null +++ b/SL/Controller/LoginScreen.pm @@ -0,0 +1,82 @@ +package SL::Controller::LoginScreen; + +use strict; + +use parent qw(SL::Controller::Base); + +use SL::Dispatcher::AuthHandler::User; +use SL::User; + +# +# actions +# + +sub action_user_login { + my ($self) = @_; + + $self->render('login_screen/user_login'); +} + +sub action_logout { + my ($self) = @_; + + $::auth->destroy_session; + $::auth->create_or_refresh_session; + $self->render('login_screen/user_login', error => $::locale->text('You are logged out!')); +} + +sub action_login { + my ($self) = @_; + + %::myconfig = $::form->{'{AUTH}login'} ? $::auth->read_user(login => $::form->{'{AUTH}login'}) : (); + %::myconfig = SL::Dispatcher::AuthHandler::User->new->handle(countrycode => $::myconfig{countrycode}); + $::form->{login} = $::myconfig{login}; + $::locale = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode}; + my $user = User->new(login => $::myconfig{login}); + + # if we get an error back, bale out + my $result = $user->login($::form); + + # Database update available? + ::end_of_request() if -2 == $result; + + # Auth DB needs update? If so log the user out forcefully. + if (-3 == $result) { + $::auth->destroy_session; + return $self->render('login_screen/auth_db_needs_update'); + } + + # Other login errors. + if (0 > $result) { + $::auth->punish_wrong_login; + return $self->render('login_screen/user_login', error => $::locale->text('Incorrect username or password!')); + } + + # Everything is fine. + $::auth->set_cookie_environment_variable(); + + return $self->redirect_to($::form->{callback}) if $::form->{callback}; + + my %style_to_script_map = ( + v3 => 'v3', + neu => 'new', + v4 => 'v4', + ); + + my $menu_script = $style_to_script_map{$user->{menustyle}} || ''; + + $self->redirect_to(controller => "menu${menu_script}.pl", action => 'display'); +} + +# +# settings +# +sub get_auth_level { + return 'none'; +} + +sub keep_auth_vars_in_form { + return 1; +} + +1; diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 747da0485..f6c9f60cf 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -56,7 +56,7 @@ sub pre_request_checks { ::run(); ::end_of_request(); } else { - show_error('login/auth_db_unreachable'); + show_error('login_screen/auth_db_unreachable'); } } } @@ -67,10 +67,10 @@ sub show_error { my $error_type = shift || ''; my %params = @_; - $::locale = Locale->new($::lx_office_conf{system}->{language}); + $::myconfig{countrycode} = delete($params{countrycode}) || $::lx_office_conf{system}->{language}; + $::locale = Locale->new($::myconfig{countrycode}); $::form->{error} = $::locale->text('The session is invalid or has expired.') if ($error_type eq 'session'); - $::form->{error} = $::locale->text('Incorrect password!.') if ($error_type eq 'password'); - $::myconfig{countrycode} = $::lx_office_conf{system}->{language}; + $::form->{error} = $::locale->text('Incorrect password!') if ($error_type eq 'password'); $::form->header; print $::form->parse_html_template($template, \%params); @@ -200,24 +200,29 @@ sub handle_request { $::form->error($::locale->text('System currently down for maintenance!')) if -e ($::lx_office_conf{paths}->{userspath} . "/nologin") && $script ne 'admin'; - if ($script eq 'login' or $script eq 'admin') { - $::form->{titlebar} = "Lx-Office " . $::locale->text('Version') . " $::form->{version}"; + ($routing_type, $script, $script_name, $action) = qw(controller controller LoginScreen login) if ($script eq 'login') && ($action eq 'login'); + + if (($script eq 'login') && !$action) { + print $::request->{cgi}->redirect('controller.pl?action=LoginScreen/user_login'); + + } elsif ($script eq 'admin') { + $::form->{titlebar} = "kivitendo " . $::locale->text('Version') . " $::form->{version}"; ::run($session_result); } else { - show_error('login/password_error', 'session') if SL::Auth::SESSION_EXPIRED == $session_result; + show_error('login_screen/user_login', 'session') if SL::Auth::SESSION_EXPIRED == $session_result; - my $auth_level = $self->{auth_handler}->handle( + my %auth_result = $self->{auth_handler}->handle( routing_type => $routing_type, script => $script, controller => $script_name, action => $action, ); - delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } }; + delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } } unless $auth_result{keep_auth_vars}; if ($action) { - $::instance_conf->init if $auth_level eq 'user'; + $::instance_conf->init if $auth_result{auth_level} eq 'user'; map { $::form->{$_} = $::myconfig{$_} } qw(charset) unless $action eq 'save' && $::form->{type} eq 'preferences'; @@ -371,9 +376,9 @@ sub _check_for_old_config_files { my @old_files = grep { -f "config/${_}" } qw(authentication.pl console.conf lx-erp.conf lx-erp-local.conf); return unless @old_files; - $::form->{title} = $::locale->text('Old configuration files'); + $::form->{title} = $::locale->text('Old configuration files'); $::form->header; - print $::form->parse_html_template('login/old_configuration_files', { FILES => \@old_files }); + print $::form->parse_html_template('login_screen/old_configuration_files', { FILES => \@old_files }); ::end_of_request(); } diff --git a/SL/Dispatcher/AuthHandler.pm b/SL/Dispatcher/AuthHandler.pm index 60dc63720..22b2be44d 100644 --- a/SL/Dispatcher/AuthHandler.pm +++ b/SL/Dispatcher/AuthHandler.pm @@ -5,8 +5,11 @@ use strict; use parent qw(Rose::Object); use SL::Dispatcher::AuthHandler::Admin; +use SL::Dispatcher::AuthHandler::None; use SL::Dispatcher::AuthHandler::User; +my %valid_auth_levels = map { ($_ => 1) } qw(user admin none); + sub handle { my ($self, %param) = @_; @@ -16,7 +19,10 @@ sub handle { $self->{handlers}->{$handler_name} ||= $handler_name->new; $self->{handlers}->{$handler_name}->handle; - return $auth_level; + return ( + auth_level => $auth_level, + keep_auth_vars => $self->get_keep_auth_vars(%param), + ); } sub get_auth_level { @@ -26,7 +32,13 @@ sub get_auth_level { : $param{routing_type} eq 'controller' ? "SL::Controller::$param{controller}"->get_auth_level($param{action}) : 'user'; - return $auth_level eq 'user' ? 'user' : 'admin'; + return $valid_auth_levels{$auth_level} ? $auth_level : 'user'; +} + +sub get_keep_auth_vars { + my ($self, %param) = @_; + + return $param{routing_type} eq 'controller' ? "SL::Controller::$param{controller}"->keep_auth_vars_in_form : 0; } 1; diff --git a/SL/Dispatcher/AuthHandler/Admin.pm b/SL/Dispatcher/AuthHandler/Admin.pm index 07778b6db..77202e8e4 100644 --- a/SL/Dispatcher/AuthHandler/Admin.pm +++ b/SL/Dispatcher/AuthHandler/Admin.pm @@ -10,8 +10,9 @@ sub handle { return if $::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::form->{'{AUTH}admin_password'}) == $::auth->OK()); return if !$::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::auth->get_session_value('admin_password')) == $::auth->OK()); + $::auth->punish_wrong_login; $::auth->delete_session_value('admin_password'); - SL::Dispatcher::show_error('login/password_error', 'password', is_admin => 1); + SL::Dispatcher::show_error('admin/adminlogin', 'password'); } 1; diff --git a/SL/Dispatcher/AuthHandler/None.pm b/SL/Dispatcher/AuthHandler/None.pm new file mode 100644 index 000000000..0ce88a63d --- /dev/null +++ b/SL/Dispatcher/AuthHandler/None.pm @@ -0,0 +1,11 @@ +package SL::Dispatcher::AuthHandler::None; + +use strict; + +use parent qw(Rose::Object); + +sub handle { + %::myconfig = (); +} + +1; diff --git a/SL/Dispatcher/AuthHandler/User.pm b/SL/Dispatcher/AuthHandler/User.pm index 56dbf9a34..150245c58 100644 --- a/SL/Dispatcher/AuthHandler/User.pm +++ b/SL/Dispatcher/AuthHandler/User.pm @@ -5,22 +5,33 @@ use strict; use parent qw(Rose::Object); sub handle { + my ($self, %param) = @_; + my $login = $::form->{'{AUTH}login'} || $::auth->get_session_value('login'); - SL::Dispatcher::show_error('login/password_error', 'password') if not defined $login; + $self->_error(%param) if !defined $login; %::myconfig = $::auth->read_user(login => $login); - SL::Dispatcher::show_error('login/password_error', 'password') unless $::myconfig{login}; + $self->_error(%param) unless $::myconfig{login}; $::locale = Locale->new($::myconfig{countrycode}); - my $ok = $::form->{'{AUTH}login'} && (SL::Auth::OK == $::auth->authenticate($login, $::form->{'{AUTH}password'})); - $ok ||= !$::form->{'{AUTH}login'} && (SL::Auth::OK == $::auth->authenticate($login, undef)); + my $ok = $::form->{'{AUTH}login'} && (SL::Auth::OK() == $::auth->authenticate($::myconfig{login}, $::form->{'{AUTH}password'})); + $ok ||= !$::form->{'{AUTH}login'} && (SL::Auth::OK() == $::auth->authenticate($::myconfig{login}, undef)); - SL::Dispatcher::show_error('login/password_error', 'password') if !$ok; + $self->_error(%param) if !$ok; $::auth->create_or_refresh_session; $::auth->delete_session_value('FLASH'); + + return %::myconfig; +} + +sub _error { + my $self = shift; + + $::auth->punish_wrong_login; + SL::Dispatcher::show_error('login_screen/user_login', 'password', @_); } 1; diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index 42971fac5..4409505c1 100755 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -96,6 +96,7 @@ sub run { if ($form->{action}) { if ($auth->authenticate_root($form->{'{AUTH}admin_password'}) != $auth->OK()) { + $auth->punish_wrong_login; $form->{error_message} = $locale->text('Incorrect Password!'); $auth->delete_session_value('admin_password'); adminlogin(); diff --git a/bin/mozilla/login.pl b/bin/mozilla/login.pl index a3184b59c..e79b6af5f 100644 --- a/bin/mozilla/login.pl +++ b/bin/mozilla/login.pl @@ -41,127 +41,6 @@ our $cgi; our $form; our $auth; -sub run { - $::lxdebug->enter_sub; - my $session_result = shift; - - $form = $::form; - $auth = $::auth; - - $form->{stylesheet} = "lx-office-erp.css"; - $form->{favicon} = "favicon.ico"; - - if (SL::Auth::SESSION_EXPIRED == $session_result) { - $form->{error_message} = $::locale->text('The session is invalid or has expired.'); - login_screen(); - ::end_of_request(); - } - my $action = $form->{action}; - if (!$action && $auth->{SESSION}->{login}) { - $action = 'login'; - } - if ($action) { - $form->{login} = $form->{'{AUTH}login'} || $form->{login}; - %::myconfig = $auth->read_user(login => $form->{login}) if $form->{login}; - - $::locale = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode}; - - if (SL::Auth::OK != $auth->authenticate($::myconfig{login}, $form->{'{AUTH}password'})) { - $form->{error_message} = $::locale->text('Incorrect username or password!'); - login_screen(); - } else { - $auth->create_or_refresh_session(); - delete $form->{'{AUTH}password'}; - - $form->{titlebar} .= " - $::myconfig{name} - $::myconfig{dbname}"; - call_sub($::locale->findsub($action)); - } - } else { - login_screen(); - } - - $::lxdebug->leave_sub; -} - -sub login_screen { - $main::lxdebug->enter_sub(); - my ($msg) = @_; - - if (-f "css/lx-office-erp.css") { - $form->{stylesheet} = "lx-office-erp.css"; - } - - $form->{msg} = $msg; - $form->header(); - - print $form->parse_html_template('login/login_screen'); - - $main::lxdebug->leave_sub(); -} - -sub login { - $main::lxdebug->enter_sub(); - - unless ($form->{login}) { - login_screen($::locale->text('You did not enter a name!')); - ::end_of_request(); - } - - my $user = User->new(login => $form->{login}); - - # if we get an error back, bale out - my $result; - if (($result = $user->login($form)) <= -1) { - if ($result == -3) { - show_error('login/auth_db_needs_update'); - $::auth->destroy_session; - ::end_of_request(); - } - - ::end_of_request() if $result == -2; - login_screen($::locale->text('Incorrect username or password!')); - ::end_of_request(); - } - - my %style_to_script_map = ( - v3 => 'v3', - neu => 'new', - v4 => 'v4', - ); - - my $menu_script = $style_to_script_map{$user->{menustyle}} || ''; - - # made it this far, execute the menu - # standard redirect does not seem to work for this invocation, (infinite loops?) - # do a manual invocation instead -# $form->{callback} = build_std_url("script=menu${menu_script}.pl", 'action=display', "callback=" . $form->escape($form->{callback})); - - $main::auth->set_cookie_environment_variable(); - - $::form->{script} = "menu${menu_script}.pl"; - $::form->{action} = 'display'; - $::form->{callback} = $::form->escape($::form->{callback}); - - require "bin/mozilla/$::form->{script}"; - display(); - -# $form->redirect(); - - $main::lxdebug->leave_sub(); -} - -sub logout { - $main::lxdebug->enter_sub(); - - $main::auth->destroy_session(); - - # remove the callback to display the message - $form->{callback} = "login.pl?action="; - $form->redirect($::locale->text('You are logged out!')); - - $main::lxdebug->leave_sub(); -} - sub company_logo { $main::lxdebug->enter_sub(); @@ -180,22 +59,6 @@ sub company_logo { $main::lxdebug->leave_sub(); } -sub show_error { - my $template = shift; - my %myconfig = %main::myconfig; - $myconfig{countrycode} = $::lx_office_conf{system}->{language}; - $form->{stylesheet} = 'css/lx-office-erp.css'; - - $form->header(); - print $form->parse_html_template($template); - - # $form->parse_html_template('login/auth_db_unreachable'); - # $form->parse_html_template('login/auth_db_needs_update'); - # $form->parse_html_template('login/authentication_pl_missing'); - - ::end_of_request(); -} - 1; __END__ diff --git a/bin/mozilla/menujs.pl b/bin/mozilla/menujs.pl index 54637216c..202f75c26 100644 --- a/bin/mozilla/menujs.pl +++ b/bin/mozilla/menujs.pl @@ -79,7 +79,7 @@ sub clock_line { my $login = "[Nutzer " . $form->{login} - . " - " + . " - " . $::locale->text('Logout') . "] "; my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat, diff --git a/index.html b/index.html index 27b0f6a40..d785dd2b2 100644 --- a/index.html +++ b/index.html @@ -1,8 +1,8 @@ - + - Lx-Office-Login + kivitendo-Login diff --git a/locale/de/all b/locale/de/all index c0b483809..394de3295 100644 --- a/locale/de/all +++ b/locale/de/all @@ -969,7 +969,6 @@ $self->{texts} = { 'Incoming Payments' => 'Zahlungseingänge', 'Incoming invoice number' => 'Eingangsrechnungsnummer', 'Incorrect Password!' => 'Ungültiges Passwort!', - 'Incorrect password!.' => 'Ungültiges Passwort!.', 'Incorrect username or password!' => 'Ungültiger Benutzername oder falsches Passwort!', 'Increase' => 'Erhöhen', 'Individual Items' => 'Einzelteile', diff --git a/locale/de_DE/all b/locale/de_DE/all index 8d090b85d..eb83e18e3 100644 --- a/locale/de_DE/all +++ b/locale/de_DE/all @@ -954,7 +954,6 @@ $self->{texts} = { 'Incoming Payments' => 'Zahlungseingänge', 'Incoming invoice number' => 'Eingangsrechnungsnummer', 'Incorrect Password!' => 'Passwort falsch!', - 'Incorrect password!.' => 'Ungültiges Passwort!.', 'Incorrect username or password!' => 'Ungültiger Benutzername oder falsches Passwort!', 'Increase' => 'Erhöhen', 'Individual Items' => 'Einzelteile', diff --git a/menu.ini b/menu.ini index ac8f9b9b1..587376bf3 100644 --- a/menu.ini +++ b/menu.ini @@ -823,6 +823,6 @@ action=company_logo no_todo_list=1 [Program--Logout] -module=login.pl -action=logout +module=controller.pl +action=LoginScreen/logout target=_top diff --git a/templates/webpages/admin/adminlogin.html b/templates/webpages/admin/adminlogin.html index 42583f389..876cb4ee7 100644 --- a/templates/webpages/admin/adminlogin.html +++ b/templates/webpages/admin/adminlogin.html @@ -10,8 +10,8 @@

[% 'Administration' | $T8 %]

- [% IF error_message %] -

+ [% IF error %] +

[% END %]
@@ -29,7 +29,7 @@

[% 'kivitendo Homepage' | $T8 %]: http://kivitendo.de

-

[%- LxERP.t8('Back to the login page') %]

+

[%- LxERP.t8('Back to the login page') %]

diff --git a/templates/webpages/admin/list_users.html b/templates/webpages/admin/list_users.html index 95d0f8f9e..39883d173 100644 --- a/templates/webpages/admin/list_users.html +++ b/templates/webpages/admin/list_users.html @@ -62,7 +62,8 @@
-
+ +
[% 'User Login' | $T8 %]
@@ -75,7 +76,7 @@ [% 'Password' | $T8 %] - + diff --git a/templates/webpages/dbupgrade/warning.html b/templates/webpages/dbupgrade/warning.html index 9de5e9e4d..3a4ea59c8 100644 --- a/templates/webpages/dbupgrade/warning.html +++ b/templates/webpages/dbupgrade/warning.html @@ -1,9 +1,9 @@ [%- USE T8 %] [%- USE HTML %] [%- USE LxERP %] - + - +

[% LxERP.t8('kivitendo is about to update the database [ #1 ].', dbname) | html %] diff --git a/templates/webpages/login/authentication_pl_missing.html b/templates/webpages/login/authentication_pl_missing.html deleted file mode 100644 index 8f158cf71..000000000 --- a/templates/webpages/login/authentication_pl_missing.html +++ /dev/null @@ -1,16 +0,0 @@ -[%- USE T8 %] - - -

[% 'Error!' | $T8 %]

- -

[% 'The authentication configuration file "config/lx_office.conf" does not exist. This kivitendo installation has probably not been updated correctly yet. Please contact your administrator.' | $T8 %]

- -

[% 'If you yourself want to upgrade the installation then please read the file "doc/UPGRADE" and follow the steps outlined in this file.' | $T8 %]

- -

- [% 'Login' | $T8 %] | - [% 'Administration' | $T8 %] -

- - - diff --git a/templates/webpages/login/password_error.html b/templates/webpages/login/password_error.html deleted file mode 100644 index 1ee8ec830..000000000 --- a/templates/webpages/login/password_error.html +++ /dev/null @@ -1,11 +0,0 @@ -[%- USE T8 %] - - -

[% 'Error!' | $T8 %]

- -

[% error %]

- -

[% 'Login' | $T8 %]

- - - diff --git a/templates/webpages/login/auth_db_needs_update.html b/templates/webpages/login_screen/auth_db_needs_update.html similarity index 90% rename from templates/webpages/login/auth_db_needs_update.html rename to templates/webpages/login_screen/auth_db_needs_update.html index fb01cbf88..a15da6be7 100644 --- a/templates/webpages/login/auth_db_needs_update.html +++ b/templates/webpages/login_screen/auth_db_needs_update.html @@ -18,7 +18,7 @@

- [% LxERP.t8('Login') %] | + [% LxERP.t8('Login') %] | [% LxERP.t8('Administration') %]

diff --git a/templates/webpages/login/auth_db_unreachable.html b/templates/webpages/login_screen/auth_db_unreachable.html similarity index 90% rename from templates/webpages/login/auth_db_unreachable.html rename to templates/webpages/login_screen/auth_db_unreachable.html index 5ca592bb1..c756e5c62 100644 --- a/templates/webpages/login/auth_db_unreachable.html +++ b/templates/webpages/login_screen/auth_db_unreachable.html @@ -13,7 +13,7 @@

- [% 'Login' | $T8 %] | + [% 'Login' | $T8 %] | [% 'Administration' | $T8 %]

diff --git a/templates/webpages/login/old_configuration_files.html b/templates/webpages/login_screen/old_configuration_files.html similarity index 91% rename from templates/webpages/login/old_configuration_files.html rename to templates/webpages/login_screen/old_configuration_files.html index a7f80a40b..e477a42f7 100644 --- a/templates/webpages/login/old_configuration_files.html +++ b/templates/webpages/login_screen/old_configuration_files.html @@ -26,7 +26,7 @@

- [%- LxERP.t8('Back to login') %] + [%- LxERP.t8('Back to login') %]

diff --git a/templates/webpages/login/login_screen.html b/templates/webpages/login_screen/user_login.html similarity index 82% rename from templates/webpages/login/login_screen.html rename to templates/webpages/login_screen/user_login.html index f34f9010c..877cc18a6 100644 --- a/templates/webpages/login/login_screen.html +++ b/templates/webpages/login_screen/user_login.html @@ -8,13 +8,13 @@ - [% IF error_message %] -

+ [% IF error %] +

[% END %]

- + @@ -33,7 +33,7 @@
- + diff --git a/templates/webpages/menu/header.html b/templates/webpages/menu/header.html index 1fb3c5eb3..b1a2daf87 100644 --- a/templates/webpages/menu/header.html +++ b/templates/webpages/menu/header.html @@ -4,7 +4,7 @@ [% UNLESS is_links %] [[% 'Menu' | $T8 %]] - [[% 'New Win/Tab' | $T8 %]] + [[% 'New Win/Tab' | $T8 %]] [[% 'Print' | $T8 %]] [[% 'Back' | $T8 %]] [[% 'Fwd' | $T8 %]] @@ -23,7 +23,7 @@ [% 'User' | $T8 %]: [% MYCONFIG.login %] - [[% 'Logout' | $T8 %]] + [[% 'Logout' | $T8 %]] [% now.to_lxoffice %] - [% now.hms %] diff --git a/templates/webpages/menu/menunew.html b/templates/webpages/menu/menunew.html index 452c43a2e..d55267541 100644 --- a/templates/webpages/menu/menunew.html +++ b/templates/webpages/menu/menunew.html @@ -26,7 +26,7 @@ window.onload=clockon [[% 'User' | $T8 %]: [% HTML.escape(login) %] - - [% 'logout' | $T8 %]] + [% 'logout' | $T8 %]] [% date %]   diff --git a/templates/webpages/menu/menuv3.html b/templates/webpages/menu/menuv3.html index 6faa762e0..cfe50a3e5 100644 --- a/templates/webpages/menu/menuv3.html +++ b/templates/webpages/menu/menuv3.html @@ -51,7 +51,7 @@ window.onload=clockon [[% 'User' | $T8 %]: [% HTML.escape(login) %] - - [% 'logout' | $T8 %]] + [% 'logout' | $T8 %]] [% date %]   diff --git a/templates/webpages/menu/menuv4.html b/templates/webpages/menu/menuv4.html index 0a11fe48b..b0b72f40b 100644 --- a/templates/webpages/menu/menuv4.html +++ b/templates/webpages/menu/menuv4.html @@ -8,7 +8,7 @@ [[% 'User' | $T8 %]: [% HTML.escape(login) %] - - [% 'logout' | $T8 %]] + [% 'logout' | $T8 %]] [% date %]   -- 2.20.1