Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a72a4c89

Von Bernd Bleßmann vor 3 Monaten hinzugefügt

  • ID a72a4c89a3504ed4fb570e504c72f45563821eef
  • Vorgänger 1dc7c77a
  • Nachfolger 1d95e0f7

Menü: VK-/EK-Berichte-Rechnungen: Nicht anzeigen, wenn kein Rechte. …

… Eben auch nicht, wenn man nicht in die Listen von Ansehrechten für
projektbezogene Rechnungen eingetragen ist.

Unterschiede anzeigen:

SL/Menu.pm
5 5
use SL::Auth;
6 6
use File::Spec;
7 7
use SL::MoreCommon qw(uri_encode);
8
use SL::InstanceState;
8 9
use SL::YAML;
9 10

  
10 11
our %menu_cache;
......
40 41
      _merge($nodes, $nodes_by_id, $data);
41 42
    }
42 43

  
44
    my $instance_state = SL::InstanceState->new;
43 45

  
44 46
    my $self = bless {
45 47
      nodes => $nodes,
46 48
      by_id => $nodes_by_id,
49
      instance_state => $instance_state,
47 50
    }, $package;
48 51

  
49 52
    $self->build_tree;
......
196 199
    } else {
197 200
      if ($token =~ m{^ client / (.*) }x) {
198 201
        push @{$cur_ary}, $self->parse_instance_conf_string($1);
202
      } elsif ($token =~ m{^ state / (.*) }x) {
203
        push @{$cur_ary}, $self->parse_instance_state_string($1);
199 204
      } else {
200 205
        push @{$cur_ary}, $::auth->check_right($::myconfig{login}, $token, 1);
201 206
      }
......
239 244
  return $::instance_conf->data->{$setting};
240 245
}
241 246

  
247
sub parse_instance_state_string {
248
  my ($self, $setting) = @_;
249
  return $self->{instance_state}->$setting;
250
}
251

  
242 252
sub clear_access {
243 253
  my ($self) = @_;
244 254
  for my $node ($self->tree_walk("all")) {
menus/user/00-erp.yaml
322 322
  name: Invoices, Credit Notes & AR Transactions
323 323
  icon: invoices_report
324 324
  order: 500
325
  access: invoice_edit | sales_invoice_view | sales_all_edit | state/has_employee_project_invoices
325 326
  module: ar.pl
326 327
  params:
327 328
    action: search
......
517 518
  id: ap_reports_vendor_invoices_ap_transactions
518 519
  name: Vendor Invoices & AP Transactions
519 520
  order: 400
521
  access: vendor_invoice_edit | purchase_invoice_view | purchase_all_edit | state/has_employee_project_invoices
520 522
  module: ap.pl
521 523
  params:
522 524
    action: search

Auch abrufbar als: Unified diff