Module config option to hide deleted user and group.
authorJamie Cameron <jcameron@webmin.com>
Tue, 21 Dec 2010 17:16:53 +0000 (09:16 -0800)
committerJamie Cameron <jcameron@webmin.com>
Tue, 21 Dec 2010 17:16:53 +0000 (09:16 -0800)
13 files changed:
quota/CHANGELOG
quota/config-*-linux
quota/config-freebsd
quota/config-hpux
quota/config-irix
quota/config-macos
quota/config-netbsd
quota/config-openbsd
quota/config-solaris
quota/config-unixware
quota/config.info
quota/list_groups.cgi
quota/list_users.cgi

index d07fc2b..8ffaf4b 100644 (file)
@@ -39,3 +39,5 @@ Converted all pages to use the new Webmin UI library, for a more consistent look
 Converted commands in the module's API file to POD format, and added more details about each function.
 ---- Changes since 1.470 ----
 Added a module access control option to restrict allowed groups by GID range.
+---- Changes since 1.530 ----
+Added a Module Config option to hide quotas for deleted users and groups.
index 3248dbf..370c3c8 100644 (file)
@@ -22,3 +22,4 @@ block_size=1024
 show_grace=1
 email_msg=Disk usage for user ${USER} on filesystem ${FS} has reached ${PERCENT}% of the       allowed quota.          ${USED} of disk space is being used, out of a maximum of ${QUOTA}.
 pc_show=1
+hide_uids=0
index 5e15772..35d7da4 100644 (file)
@@ -19,3 +19,4 @@ block_mode=1
 show_grace=0
 email_msg=Disk usage for user ${USER} on filesystem ${FS} has reached ${PERCENT}% of the       allowed quota.          ${USED} of disk space is being used, out of a maximum of ${QUOTA}.
 pc_show=1
+hide_uids=0
index 7ffe003..26c9ea4 100644 (file)
@@ -12,3 +12,4 @@ block_mode=1
 show_grace=0
 email_msg=Disk usage for user ${USER} on filesystem ${FS} has reached ${PERCENT}% of the       allowed quota.          ${USED} of disk space is being used, out of a maximum of ${QUOTA}.
 pc_show=1
+hide_uids=0
index 66a7424..5bb26f7 100644 (file)
@@ -10,3 +10,4 @@ block_mode=1
 show_grace=0
 email_msg=Disk usage for user ${USER} on filesystem ${FS} has reached ${PERCENT}% of the       allowed quota.          ${USED} of disk space is being used, out of a maximum of ${QUOTA}.
 pc_show=1
+hide_uids=0
index 5e15772..35d7da4 100644 (file)
@@ -19,3 +19,4 @@ block_mode=1
 show_grace=0
 email_msg=Disk usage for user ${USER} on filesystem ${FS} has reached ${PERCENT}% of the       allowed quota.          ${USED} of disk space is being used, out of a maximum of ${QUOTA}.
 pc_show=1
+hide_uids=0
index 5e15772..35d7da4 100644 (file)
@@ -19,3 +19,4 @@ block_mode=1
 show_grace=0
 email_msg=Disk usage for user ${USER} on filesystem ${FS} has reached ${PERCENT}% of the       allowed quota.          ${USED} of disk space is being used, out of a maximum of ${QUOTA}.
 pc_show=1
+hide_uids=0
index 5e15772..35d7da4 100644 (file)
@@ -19,3 +19,4 @@ block_mode=1
 show_grace=0
 email_msg=Disk usage for user ${USER} on filesystem ${FS} has reached ${PERCENT}% of the       allowed quota.          ${USED} of disk space is being used, out of a maximum of ${QUOTA}.
 pc_show=1
+hide_uids=0
index 5a04d32..de32378 100644 (file)
@@ -12,3 +12,4 @@ block_mode=1
 show_grace=1
 email_msg=Disk usage for user ${USER} on filesystem ${FS} has reached ${PERCENT}% of the       allowed quota.          ${USED} of disk space is being used, out of a maximum of ${QUOTA}.
 pc_show=1
+hide_uids=0
index 7ffe003..26c9ea4 100644 (file)
@@ -12,3 +12,4 @@ block_mode=1
 show_grace=0
 email_msg=Disk usage for user ${USER} on filesystem ${FS} has reached ${PERCENT}% of the       allowed quota.          ${USED} of disk space is being used, out of a maximum of ${QUOTA}.
 pc_show=1
+hide_uids=0
index 7e33bca..0f5dfca 100644 (file)
@@ -4,6 +4,7 @@ threshold_pc=Threshold percentage to highlight used quota,3,Don't show
 pc_show=Usage percentages to show,1,2-Hard and soft,1-Hard only,0-Soft only
 sort_mode=Sort users and groups by,1,0-Blocks used,2-Name,1-Order from repquota,3-Hard block quota,4-Soft block quota,5-Percent of hard quota used,6-Percent of soft quota used
 block_mode=Show quotas in,1,1-Kilobytes (where possible),0-Blocks
+hide_uids=Show deleted users?,1,0-Yes,1-No
 line1.1=Quota email messages,11
 email_msg=Email message for users over quota,9,80,5,\t
 email_subject=Subject for email message to users,3,Default
index 2f19ec2..502a66c 100755 (executable)
@@ -144,6 +144,8 @@ elsif ($n) {
        # Generate table of groups
        foreach $i (@order) {
                next if (!&can_edit_group($group{$i,'group'}));
+               next if ($config{'hide_uids'} &&
+                        $group{$i,'group'} =~ /^#/);
                local @cols;
                if ($access{'ro'}) {
                        push(@cols, $group{$i,'group'});
index 220ec7c..fafb21b 100755 (executable)
@@ -146,6 +146,8 @@ elsif ($n) {
        # Generate table of users
        foreach $i (@order) {
                next if (!&can_edit_user($user{$i,'user'}));
+               next if ($config{'hide_uids'} &&
+                        $user{$i,'user'} =~ /^#/);
                local @cols;
                if ($access{'ro'}) {
                        push(@cols, $user{$i,'user'});