diff options
| author | bwarsaw | 2002-07-24 15:44:19 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-07-24 15:44:19 +0000 |
| commit | b4939a7b77c2e7b5b6f097ecd329695dd11229b3 (patch) | |
| tree | bef1c4b9eeab4de7e25662a35b7ae9b44821381a | |
| parent | 000b581fcfa2aad84ee59399fed5377c7314e33a (diff) | |
| download | mailman-b4939a7b77c2e7b5b6f097ecd329695dd11229b3.tar.gz mailman-b4939a7b77c2e7b5b6f097ecd329695dd11229b3.tar.zst mailman-b4939a7b77c2e7b5b6f097ecd329695dd11229b3.zip | |
| -rw-r--r-- | Mailman/Gui/Usenet.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Mailman/Gui/Usenet.py b/Mailman/Gui/Usenet.py index 2078bb939..1cdb9bbe1 100644 --- a/Mailman/Gui/Usenet.py +++ b/Mailman/Gui/Usenet.py @@ -69,3 +69,19 @@ class Usenet(GUIBase): doc.AddItem(_('Mass catchup completed')) else: GUIBase._setValue(self, mlist, property, val, doc) + + def _postValidate(self, mlist, doc): + # Make sure that if we're gating, that the newsgroups and host + # information are not blank. + if mlist.gateway_to_news or mlist.gateway_to_mail: + # BAW: It's too expensive and annoying to ensure that both the + # host is valid and that the newsgroup is a valid n.g. on the + # server. This should be good enough. + if not mlist.nntp_host or not mlist.linked_newsgroup: + doc.addError(_("""You cannot enable gatewaying unless both the + <a href="?VARHELP=gateway/nntp_host">news server field</a> and + the <a href="?VARHELP=gateway/linked_newsgroup">linked + newsgroup</a> fields are filled in.""")) + # And reset these values + mlist.gateway_to_news = 0 + mlist.gateway_to_mail = 0 |
