X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FCsvImport.pm;h=fa988cb4fb16eeca2872e5b606d7c9454d029208;hb=ee56f1b20ab915671ded297f593c0e2e245bad70;hp=86cecfe57470b8b521d7a24f51085cc7089a54a9;hpb=8e926112ea0e2f73c096c82987ae29f7078049c3;p=kivitendo-erp.git diff --git a/SL/Controller/CsvImport.pm b/SL/Controller/CsvImport.pm index 86cecfe57..fa988cb4f 100644 --- a/SL/Controller/CsvImport.pm +++ b/SL/Controller/CsvImport.pm @@ -40,7 +40,7 @@ use Rose::Object::MakeMethods::Generic ], ); -__PACKAGE__->run_before('check_auth'); +__PACKAGE__->run_before('check_auth', except => [ qw(report) ]); __PACKAGE__->run_before('ensure_form_structure'); __PACKAGE__->run_before('check_type', except => [ qw(report) ]); __PACKAGE__->run_before('load_all_profiles'); @@ -98,7 +98,6 @@ sub action_result { my $data = $self->{background_job}->data_as_hash; my $profile = SL::DB::Manager::CsvImportProfile->find_by(id => $data->{profile_id}); - $self->profile($profile); if ($data->{errors} and my $first_error = $data->{errors}->[0]) { @@ -267,7 +266,8 @@ sub action_add_mapping_from_upload { # sub check_auth { - $::auth->assert('config'); + $_[0]->check_type; + $_[0]->worker->check_auth; } sub check_type { @@ -414,7 +414,7 @@ sub load_default_profile { my $profile; if ($::form->{profile}->{id}) { - $profile = SL::DB::Manager::CsvImportProfile->find_by(id => $::form->{profile}->{id}, login => $::myconfig{login}); + $profile = SL::DB::Manager::CsvImportProfile->find_by(id => $::form->{profile}->{id}); } $profile ||= SL::DB::Manager::CsvImportProfile->find_by(type => $self->{type}, is_default => 1, login => $::myconfig{login}); $profile ||= SL::DB::CsvImportProfile->new(type => $self->{type}, login => $::myconfig{login});