Compare commits

...

1 Commits

Author SHA1 Message Date
Ilia Ross
ad2a1dc44a Fix global ACL cleanup when deleting groups
This PR fixes deleted groups leaving their global ACL file behind.

It removes that file alongside the group's module ACL files. Recreating a group with the same name no longer restores its old global permissions.
2026-10-23 20:28:25 +02:00

View File

@@ -1183,7 +1183,9 @@ my $lref = &read_file_lines("$config_directory/webmin.groups");
@$lref = grep { !/^([^:]+):/ || $1 ne $groupname } @$lref;
&flush_file_lines();
&unlock_file("$config_directory/webmin.groups");
&unlink_file(map { "$config_directory/$_/$groupname.gacl" } &list_modules());
# Remove global permissions too, so reusing the name cannot revive old ACLs.
&unlink_file(map { "$config_directory/$_/$groupname.gacl" }
("", &list_modules()));
if ($miniserv{'userdb'}) {
# Also delete from group database