Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3ad96f21

Von Bernd Bleßmann vor fast 3 Jahren hinzugefügt

  • ID 3ad96f211f51589c061900f0dfad4cd1daedd2f6
  • Vorgänger 64e2e511
  • Nachfolger e81f9f44

Recht: Ansehen von Belegen bei Angebot und Auftrag berücksichtigen

Ansehen nur im neuen Auftrags-Controller

Unterschiede anzeigen:

SL/Controller/Order.pm
56 56
# safety
57 57
__PACKAGE__->run_before('check_auth');
58 58

  
59
__PACKAGE__->run_before('check_auth_save',
60
                        except => [ qw(edit show_customer_vendor_details_dialog price_popup load_second_rows) ]);
61

  
59 62
__PACKAGE__->run_before('recalc',
60 63
                        only => [ qw(save save_as_new save_and_delivery_order save_and_invoice save_and_invoice_for_advance_payment save_and_final_invoice save_and_ap_transaction
61 64
                                     print send_email) ]);
......
1370 1373
sub check_auth {
1371 1374
  my ($self) = @_;
1372 1375

  
1376
  my $right_for = { map { $_ => $_.'_edit' . ' | ' . $_.'_view' } @{$self->valid_types} };
1377

  
1378
  my $right   = $right_for->{ $self->type };
1379
  $right    ||= 'DOES_NOT_EXIST';
1380

  
1381
  $::auth->assert($right);
1382
}
1383

  
1384
sub check_auth_save {
1385
  my ($self) = @_;
1386

  
1373 1387
  my $right_for = { map { $_ => $_.'_edit' } @{$self->valid_types} };
1374 1388

  
1375 1389
  my $right   = $right_for->{ $self->type };
......
2018 2032
    $has_final_invoice               = any {'SL::DB::Invoice' eq ref $_ && "final_invoice" eq $_->type} @$lr;
2019 2033
  }
2020 2034

  
2035
  my $right_for = { map { $_ => $_.'_edit' } @{$self->valid_types} };
2036
  my $right     = $right_for->{ $self->type };
2037
  $right      ||= 'DOES_NOT_EXIST';
2038

  
2039
  if ($::auth->assert($right, 1)) {
2021 2040
  for my $bar ($::request->layout->get('actionbar')) {
2022 2041
    $bar->add(
2023 2042
      combobox => [
......
2164 2183
        only_if  => $deletion_allowed,
2165 2184
      ],
2166 2185

  
2186
    );
2187
  }
2188
  }
2189

  
2190
  for my $bar ($::request->layout->get('actionbar')) {
2191
    $bar->add(
2167 2192
      combobox => [
2168 2193
        action => [
2169 2194
          t8('more')
......
2182 2207
      ], # end of combobox "more"
2183 2208
    );
2184 2209
  }
2210

  
2185 2211
}
2186 2212

  
2187 2213
sub generate_doc {

Auch abrufbar als: Unified diff