From 9bc05f949e59ad9cf18c2498f782a4b2308e4638 Mon Sep 17 00:00:00 2001
From: bwarsaw
Date: Thu, 19 Jul 2001 06:28:54 +0000
Subject: There are the admin gui component modules, which now contain all the
GetConfigInfo() structures that used to be in the modules one directory up.
---
Mailman/Gui/Privacy.py | 224 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 224 insertions(+)
create mode 100644 Mailman/Gui/Privacy.py
(limited to 'Mailman/Gui/Privacy.py')
diff --git a/Mailman/Gui/Privacy.py b/Mailman/Gui/Privacy.py
new file mode 100644
index 000000000..3f98c9676
--- /dev/null
+++ b/Mailman/Gui/Privacy.py
@@ -0,0 +1,224 @@
+# Copyright (C) 2001 by the Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+"""MailList mixin class managing the privacy options.
+"""
+
+from Mailman import mm_cfg
+from Mailman.i18n import _
+
+
+
+class Privacy:
+ def GetConfigCategory(self):
+ return 'privacy', _('Privacy Options')
+
+ def GetConfigInfo(self, mlist):
+ WIDTH = mm_cfg.TEXTFIELDWIDTH
+
+ if mm_cfg.ALLOW_OPEN_SUBSCRIBE:
+ sub_cfentry = ('subscribe_policy', mm_cfg.Radio,
+ # choices
+ (_('none'),
+ _('confirm'),
+ _('require approval'),
+ _('confirm+approval')),
+ 0,
+ _('What steps are required for subscription?
'),
+ _('''None - no verification steps (Not
+ Recommended )
+ confirm (*) - email confirmation step required
+ require approval - require list administrator
+ approval for subscriptions
+ confirm+approval - both confirm and approve
+
+
(*) when someone requests a subscription,
+ Mailman sends them a notice with a unique
+ subscription request number that they must reply to
+ in order to subscribe.
+
+ This prevents mischievous (or malicious) people
+ from creating subscriptions for others without
+ their consent.'''))
+ else:
+ sub_cfentry = ('subscribe_policy', mm_cfg.Radio,
+ # choices
+ (_('confirm'),
+ _('require approval'),
+ _('confirm+approval')),
+ 1,
+ _('What steps are required for subscription?
'),
+ _('''confirm (*) - email confirmation required
+ require approval - require list administrator
+ approval for subscriptions
+ confirm+approval - both confirm and approve
+
+
(*) when someone requests a subscription,
+ Mailman sends them a notice with a unique
+ subscription request number that they must reply to
+ in order to subscribe.
This prevents
+ mischievous (or malicious) people from creating
+ subscriptions for others without their consent.'''))
+
+ # some helpful values
+ adminurl = self.GetScriptURL('admin')
+
+ return [
+ _("""List access policies, including anti-spam measures, covering
+ members and outsiders. See also the Archival Options section for separate
+ archive-privacy settings."""),
+
+ _('Subscribing'),
+ ('advertised', mm_cfg.Radio, (_('No'), _('Yes')), 0,
+ _('''Advertise this list when people ask what lists are on this
+ machine?''')),
+
+ sub_cfentry,
+
+ _("Membership exposure"),
+ ('private_roster', mm_cfg.Radio,
+ (_('Anyone'), _('List members'), _('List admin only')), 0,
+ _('Who can view subscription list?'),
+
+ _('''When set, the list of subscribers is protected by member or
+ admin password authentication.''')),
+
+ ('obscure_addresses', mm_cfg.Radio, (_('No'), _('Yes')), 0,
+ _("""Show member addrs so they're not directly recognizable as
+ email addrs?"""),
+ _("""Setting this option causes member email addresses to be
+ transformed when they are presented on list web pages (both in
+ text and as links), so they're not trivially recognizable as
+ email addresses. The intention is to to prevent the addresses
+ from being snarfed up by automated web scanners for use by
+ spammers.""")),
+
+ _("General posting filters"),
+ ('moderated', mm_cfg.Radio, (_('No'), _('Yes')), 0,
+ _('Must posts be approved by an administrator?')),
+
+ ('member_posting_only', mm_cfg.Radio, (_('No'), _('Yes')), 0,
+ _("""Restrict posting privilege to list members?
+ (member_posting_only)"""),
+
+ _("""Use this option if you want to restrict posting to list
+ members. If you want list members to be able to post, plus a
+ handful of other posters, see the posters setting
+ below.""")),
+
+ ('posters', mm_cfg.EmailList, (5, WIDTH), 1,
+ _('''Addresses of members accepted for posting to this list
+ without implicit approval requirement. (See "Restrict ... to list
+ members" for whether or not this is in addition to allowing
+ posting by list members'''),
+
+ _("""Adding entries here will have one of two effects, according
+ to whether another option restricts posting to members.
+
+
The cost is that the list will not accept unhindered any + postings relayed from other addresses, unless + +
For backwards compatibility with Mailman 1.1, if the regexp + does not contain an `@', then the pattern is matched against just + the local part of the recipient address. If that match fails, or + if the pattern does contain an `@', then the pattern is matched + against the entire recipient address. + +
Matching against the local part is deprecated; in a future + release, the pattern will always be matched against the entire + recipient address.""")), + + ('max_num_recipients', mm_cfg.Number, 5, 0, + _('Ceiling on acceptable number of recipients for a posting.'), + + _('''If a posting has this number, or more, of recipients, it is + held for admin approval. Use 0 for no ceiling.''')), + + ('forbidden_posters', mm_cfg.EmailList, (5, WIDTH), 1, + _('Addresses whose postings are always held for approval.'), + _('''Email addresses whose posts should always be held for + approval, no matter what other options you have set. See also + the subsequent option which applies to arbitrary content of + arbitrary headers.''')), + + ('bounce_matching_headers', mm_cfg.Text, (6, WIDTH), 0, + _('Hold posts with header value matching a specified regexp.'), + _("""Use this option to prohibit posts according to specific + header values. The target value is a regular-expression for + matching against the specified header. The match is done + disregarding letter case. Lines beginning with '#' are ignored + as comments. + +
For example:
to: .*@public.comsays to hold all + postings with a To: mail header containing '@public.com' + anywhere among the addresses. + +
Note that leading whitespace is trimmed from the regexp. This + can be circumvented in a number of ways, e.g. by escaping or + bracketing it. + +
See also the forbidden_posters option for a related + mechanism.""")), + + ('anonymous_list', mm_cfg.Radio, (_('No'), _('Yes')), 0, + _("""Hide the sender of a message, replacing it with the list + address (Removes From, Sender and Reply-To fields)""")), + ] + -- cgit v1.2.3-70-g09d2