@menu = grep { /^${menulevel}--/ } @{ $self->{ORDER} };
}
- my @a = split /;/, $myconfig->{acs};
- my $excl = ();
-
- # remove --AR, --AP from array
- grep { ($a, $b) = split /--/; s/--$a$//; } @a;
+ my @a = split /;/, $myconfig->{acs};
+ my %excl;
map { $excl{$_} = 1 } @a;
return @a;
}
+sub generate_acl {
+ my ($self, $menulevel, $hash) = @_;
+
+ my @items = $self->access_control(\%main::myconfig, $menulevel);
+
+ $menulevel =~ s/[^A-Za-z_\/\.\+\-]/_/g;
+ $hash->{"access_" . lc($menulevel)} = 1 if ($menulevel);
+
+ foreach my $item (@items) {
+ $self->generate_acl($item, $hash); #unless ($menulevel);
+ }
+}
+
1;