mirror of
https://github.com/webmin/webmin.git
synced 2025-07-25 15:09:18 +00:00
Fix not to show link if nothing to do
This commit is contained in:
@ -1299,6 +1299,19 @@ foreach my $u (split(/\s+/, $access{'users'})) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
=head2 can_module_acl(&mod)
|
||||||
|
|
||||||
|
Returns 1 if the given module has ability to manage its own ACLs.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
sub can_module_acl
|
||||||
|
{
|
||||||
|
my ($mod) = @_;
|
||||||
|
my $mdir = &module_root_directory($mod);
|
||||||
|
return 1 if (-f "$mdir/acl_security.pl" || -f "$mdir/config.info");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
=head2 open_session_db(\%miniserv)
|
=head2 open_session_db(\%miniserv)
|
||||||
|
|
||||||
Opens the session database, and ties it to the sessiondb hash. Parameters are :
|
Opens the session database, and ties it to the sessiondb hash. Parameters are :
|
||||||
|
@ -404,7 +404,8 @@ foreach my $c (sort { $b cmp $a } @cats) {
|
|||||||
}
|
}
|
||||||
elsif ($mcan{$md}) {
|
elsif ($mcan{$md}) {
|
||||||
my $label;
|
my $label;
|
||||||
if ($access{'acl'} && $in{'user'} && !$safe) {
|
if ($access{'acl'} && $in{'user'} && !$safe &&
|
||||||
|
&can_module_acl($m)) {
|
||||||
# Show link for editing ACL
|
# Show link for editing ACL
|
||||||
$label = ui_link("edit_acl.cgi?" .
|
$label = ui_link("edit_acl.cgi?" .
|
||||||
"mod=" . urlize($m->{'dir'}) .
|
"mod=" . urlize($m->{'dir'}) .
|
||||||
|
Reference in New Issue
Block a user