mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Show warning if home dirs being deleted contain other files
This commit is contained in:
@@ -478,6 +478,7 @@ pft_6=MacOS NetInfo database
|
||||
umass_title=Delete Users
|
||||
umass_err=Failed to delete users
|
||||
umass_sure=Are you sure you want to delete the $1 selected users? Their home directories contain $2 of files.
|
||||
umass_others=WARNING! Some home directories contain $1 files owned by other users.
|
||||
umass_sure2=Are you sure you want to delete the $1 selected users?
|
||||
umass_euser=You are not allowed to delete the user $1
|
||||
umass_enone=No users selected
|
||||
|
||||
@@ -228,6 +228,10 @@ else {
|
||||
foreach $user (@dlist) {
|
||||
if ($user->{'home'} ne "/" && -d $user->{'home'}) {
|
||||
$size += &disk_usage_kb($user->{'home'});
|
||||
@uothers = &backquote_command(
|
||||
"find ".quotemeta($user->{'home'}).
|
||||
" ! -user $user->{'uid'} 2>/dev/null", 1);
|
||||
push(@others, @uothers);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,8 +260,10 @@ else {
|
||||
$access{'dothers'} == 1 ?
|
||||
&ui_checkbox("others", 1, $text{'udel_dothers'},
|
||||
$config{'default_other'}) : "",
|
||||
$delete_sys && $delete_sys->{'user'} eq 'root' ?
|
||||
$text{'udel_root'} : "",
|
||||
(@others ? &text('umass_others', scalar(@others))."<p>"
|
||||
: "").
|
||||
($delete_sys && $delete_sys->{'user'} eq 'root' ?
|
||||
$text{'udel_root'} : ""),
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user