require 'spam-lib.pl'; # acl_security_form(&options) # Output HTML for editing security options for the spam module sub acl_security_form { # Allowed features print " $text{'acl_avail'}\n"; print " \n"; # Config file to edit print " $text{'acl_file'}\n"; print "",&ui_opt_textbox("file", $_[0]->{'file'}, 40, $text{'acl_filedef'}), " \n"; # Allowed auto-whitelist users print " $text{'acl_awl'}\n"; print "",&ui_radio("awl_mode", $_[0]->{'awl_groups'} ? 2 : $_[0]->{'awl_users'} ? 1 : 0, [ [ 0, $text{'acl_awl0'}."
\n" ], [ 1, &text('acl_awl1', &ui_textbox("awl_users", $_[0]->{'awl_users'}, 40). &user_chooser_button("awl_users", 1))."
\n" ], [ 2, &text('acl_awl2', &ui_textbox("awl_groups", $_[0]->{'awl_groups'}, 40). &group_chooser_button("awl_users", 1))."
\n" ], ])," \n"; } # acl_security_save(&options) # Parse the form for security options for the cron module sub acl_security_save { $_[0]->{'avail'} = join(",", split(/\0/, $in{'avail'})); $_[0]->{'file'} = $in{'file_def'} ? undef : $in{'file'}; delete($_[0]->{'awl_users'}); delete($_[0]->{'awl_groups'}); if ($in{'awl_mode'} == 1) { $_[0]->{'awl_users'} = $in{'awl_users'}; } elsif ($in{'awl_mode'} == 2) { $_[0]->{'awl_groups'} = $in{'awl_groups'}; } }