Fix to preserve ACL even for modules with noacl flag

What matters now is that the module gets removed from ACLs, and the new module config page (that didn't exist before) stops working. So the simplest and best solution is to keep the module visible normally, but skip editable ACLs—since the plugin is meant to be controlled by Virtualmin permissions, and access to its config should always be allowed.

https://github.com/webmin/webmin/pull/2426/files#r1972474077
This commit is contained in:
Ilia Ross
2025-04-24 11:25:03 +03:00
parent b2626ca9c1
commit 201d817e9d

View File

@@ -396,7 +396,6 @@ foreach my $c (sort { $b cmp $a } @cats) {
my @grid = ( );
my $sw = 0;
foreach my $m (@cmlist) {
next if ($m->{'noacl'});
my $md = $m->{'dir'};
my $fromgroup = $memg &&
&indexof($md, @{$memg->{'modules'}}) >= 0;
@@ -409,7 +408,7 @@ foreach my $c (sort { $b cmp $a } @cats) {
elsif ($mcan{$md}) {
my $label;
if ($access{'acl'} && $in{'user'} && !$safe &&
&can_module_acl($m)) {
&can_module_acl($m) && !$m->{'noacl'}) {
# Show link for editing ACL
$label = ui_link("edit_acl.cgi?" .
"mod=" . urlize($m->{'dir'}) .