X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FAdmin.pm;h=e6200896cb6704d04b44d93a32d671a32cb2cc89;hb=cf96c5880f1ba0694298d7541fedce47c8c99051;hp=5323632a5f966e9668868c1e14926273eef2d085;hpb=4a3959958abe815dc130e2e4e554c26e331475bd;p=kivitendo-erp.git diff --git a/SL/Controller/Admin.pm b/SL/Controller/Admin.pm index 5323632a5..e6200896c 100644 --- a/SL/Controller/Admin.pm +++ b/SL/Controller/Admin.pm @@ -31,7 +31,7 @@ __PACKAGE__->run_before(\&setup_layout); __PACKAGE__->run_before(\&setup_client, only => [ qw(list_printers new_printer edit_printer save_printer delete_printer) ]); sub get_auth_level { "admin" }; -sub keep_auth_vars { +sub keep_auth_vars_in_form { my ($class, %params) = @_; return $params{action} eq 'login'; } @@ -84,10 +84,9 @@ sub action_create_auth_tables { $::auth->set_session_value('admin_password', $::lx_office_conf{authentication}->{admin_password}); $::auth->create_or_refresh_session; - return if $self->apply_dbupgrade_scripts; + my $scripts_applied = $self->apply_dbupgrade_scripts; - my $group = (SL::DB::Manager::AuthGroup->get_all(limit => 1))[0]; - if (!$group) { + if (! SL::DB::Manager::AuthGroup->get_all_count) { SL::DB::AuthGroup->new( name => t8('Full Access'), description => t8('Full access to all functions'), @@ -95,7 +94,7 @@ sub action_create_auth_tables { )->save; } - $self->action_login; + $self->action_login unless $scripts_applied; } # @@ -597,7 +596,7 @@ sub login_form { my ($self, %params) = @_; $::request->layout(SL::Layout::AdminLogin->new); my $version = SL::Version->get_version; - $self->render('admin/adminlogin', title => t8('kivitendo v#1 administration', $version), %params, version => $version, logo_url => $::form->read_logo ); + $self->render('admin/adminlogin', title => t8('kivitendo v#1 administration', $version), %params, version => $version ); } sub edit_user_form {