Revision 74e45f0f
Von Martin Helmling martin.helmling@octosoft.eu vor fast 8 Jahren hinzugefügt
SL/Controller/CsvImport.pm | ||
---|---|---|
32 | 32 |
use Rose::Object::MakeMethods::Generic |
33 | 33 |
( |
34 | 34 |
scalar => [ qw(type profile file all_profiles all_charsets sep_char all_sep_chars quote_char all_quote_chars escape_char all_escape_chars all_buchungsgruppen all_units |
35 |
csv_import_access |
|
36 | 35 |
import_status errors headers raw_data_headers info_headers data num_importable displayable_columns file all_taxzones) ], |
37 | 36 |
'scalar --get_set_init' => [ qw(worker task_server num_imported mappings) ], |
38 | 37 |
'array' => [ |
... | ... | |
41 | 40 |
], |
42 | 41 |
); |
43 | 42 |
|
44 |
__PACKAGE__->run_before('check_auth'); |
|
43 |
__PACKAGE__->run_before('check_auth', except => [ qw(report) ]);
|
|
45 | 44 |
__PACKAGE__->run_before('ensure_form_structure'); |
46 | 45 |
__PACKAGE__->run_before('check_type', except => [ qw(report) ]); |
47 | 46 |
__PACKAGE__->run_before('load_all_profiles'); |
... | ... | |
267 | 266 |
# |
268 | 267 |
|
269 | 268 |
sub check_auth { |
270 |
my ($self) = @_; |
|
271 |
if ( $::form->{csv_import_access} ) { |
|
272 |
$self->csv_import_access($::form->{csv_import_access}); |
|
273 |
return $::auth->assert($self->csv_import_access); |
|
274 |
} else { |
|
275 |
return $::auth->assert('config'); |
|
276 |
} |
|
269 |
$_[0]->check_type; |
|
270 |
$_[0]->worker->check_auth; |
|
277 | 271 |
} |
278 | 272 |
|
279 | 273 |
sub check_type { |
Auch abrufbar als: Unified diff
Spezifisches Recht für CSV-Import(2)
Neue Implementierung: Die access-Prüfung findet nun im "Worker" statt,
so kann für die Banktransaktionen in "CsvImport/BankTransaction"
neben "config" auch das Recht "bank_transaction" zugelassen werden.
Davon getrennt ist nun das Verhalten, das bei einem vorgegebenen Profil
dieses nich tzum Editieren angeboten wird, sondern gleich in den Import->Test gegangen wird.
Dazu ist im entsprechenden Profil der Parameter "dont_edit_profile" auf "1" zu setzen.