Revision a72a4c89
Von Bernd Bleßmann vor 5 Monaten hinzugefügt
SL/Menu.pm | ||
---|---|---|
use SL::Auth;
|
||
use File::Spec;
|
||
use SL::MoreCommon qw(uri_encode);
|
||
use SL::InstanceState;
|
||
use SL::YAML;
|
||
|
||
our %menu_cache;
|
||
... | ... | |
_merge($nodes, $nodes_by_id, $data);
|
||
}
|
||
|
||
my $instance_state = SL::InstanceState->new;
|
||
|
||
my $self = bless {
|
||
nodes => $nodes,
|
||
by_id => $nodes_by_id,
|
||
instance_state => $instance_state,
|
||
}, $package;
|
||
|
||
$self->build_tree;
|
||
... | ... | |
} else {
|
||
if ($token =~ m{^ client / (.*) }x) {
|
||
push @{$cur_ary}, $self->parse_instance_conf_string($1);
|
||
} elsif ($token =~ m{^ state / (.*) }x) {
|
||
push @{$cur_ary}, $self->parse_instance_state_string($1);
|
||
} else {
|
||
push @{$cur_ary}, $::auth->check_right($::myconfig{login}, $token, 1);
|
||
}
|
||
... | ... | |
return $::instance_conf->data->{$setting};
|
||
}
|
||
|
||
sub parse_instance_state_string {
|
||
my ($self, $setting) = @_;
|
||
return $self->{instance_state}->$setting;
|
||
}
|
||
|
||
sub clear_access {
|
||
my ($self) = @_;
|
||
for my $node ($self->tree_walk("all")) {
|
menus/user/00-erp.yaml | ||
---|---|---|
name: Invoices, Credit Notes & AR Transactions
|
||
icon: invoices_report
|
||
order: 500
|
||
access: invoice_edit | sales_invoice_view | sales_all_edit | state/has_employee_project_invoices
|
||
module: ar.pl
|
||
params:
|
||
action: search
|
||
... | ... | |
id: ap_reports_vendor_invoices_ap_transactions
|
||
name: Vendor Invoices & AP Transactions
|
||
order: 400
|
||
access: vendor_invoice_edit | purchase_invoice_view | purchase_all_edit | state/has_employee_project_invoices
|
||
module: ap.pl
|
||
params:
|
||
action: search
|
Auch abrufbar als: Unified diff
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.