From d225599fc93f0041444c1b5b7368d9025874c47b Mon Sep 17 00:00:00 2001 From: richard Date: Thu, 14 Feb 2002 23:46:02 +0000 Subject: [PATCH] . #516883 ] mail interface + ANONYMOUS_REGISTER git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@627 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 2 +- MIGRATION.txt | 14 ++++++++++++++ roundup/mailgw.py | 17 ++++++++++++----- roundup/templates/classic/instance_config.py | 17 ++++++++++++++++- roundup/templates/extended/instance_config.py | 17 ++++++++++++++++- 5 files changed, 59 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a14d0e5..6a7ba22 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,7 +13,7 @@ Fixed: . Added a uniquely Roundup header to email, "X-Roundup-Name" . All forms now have "double-submit" protection when Javascript is enabled on the client-side. - + . #516883 ] mail interface + ANONYMOUS_REGISTER 2002-01-24 - 0.4.0 Feature: diff --git a/MIGRATION.txt b/MIGRATION.txt index 7c78194..b40b0e8 100644 --- a/MIGRATION.txt +++ b/MIGRATION.txt @@ -5,10 +5,24 @@ Please read each section carefully and edit your instance home files accordingly. This file contains information for users upgrading from: + 0.4.0 -> 0.4.1 0.3.x -> 0.4.x 0.2.x -> 0.3.x +Migrating from 0.4.0 to 0.4.1 +============================= + +Configuration +------------- + +To allow more fine-grained access control, the variable used to check +permission to auto-register users in the mail gateway is now called +ANONYMOUS_REGISTER_MAIL rather than overloading ANONYMOUS_REGISTER. If the +variable doesn't exist, then ANONYMOUS_REGISTER is tested as before. + + + Migrating from 0.3.x to 0.4.x ============================= diff --git a/roundup/mailgw.py b/roundup/mailgw.py index 9a3083a..b3bda14 100644 --- a/roundup/mailgw.py +++ b/roundup/mailgw.py @@ -73,7 +73,7 @@ are calling the create() method to create a new node). If an auditor raises an exception, the original message is bounced back to the sender with the explanatory message given in the exception. -$Id: mailgw.py,v 1.63 2002-02-12 08:08:55 grubert Exp $ +$Id: mailgw.py,v 1.64 2002-02-14 23:46:02 richard Exp $ ''' @@ -444,11 +444,15 @@ Subject was: "%s" # handle the users # - # Don't create users if ANONYMOUS_REGISTER is denied - if self.instance.ANONYMOUS_REGISTER == 'deny': + # Don't create users if ANONYMOUS_REGISTER_MAIL is denied + # ... fall back on ANONYMOUS_REGISTER if the other doesn't exist + create = 1 + if hasattr(self.instance, 'ANONYMOUS_REGISTER_MAIL'): + if self.instance.ANONYMOUS_REGISTER_MAIL == 'deny': + create = 0 + elif self.instance.ANONYMOUS_REGISTER == 'deny': create = 0 - else: - create = 1 + author = self.db.uidFromAddress(message.getaddrlist('from')[0], create=create) if not author: @@ -786,6 +790,9 @@ def parseContent(content, blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'), # # $Log: not supported by cvs2svn $ +# Revision 1.63 2002/02/12 08:08:55 grubert +# . Clean up mail handling, multipart handling. +# # Revision 1.62 2002/02/05 14:15:29 grubert # . respect encodings in non multipart messages. # diff --git a/roundup/templates/classic/instance_config.py b/roundup/templates/classic/instance_config.py index ac2cffe..e36d1bb 100644 --- a/roundup/templates/classic/instance_config.py +++ b/roundup/templates/classic/instance_config.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: instance_config.py,v 1.10 2001-11-26 22:55:56 richard Exp $ +# $Id: instance_config.py,v 1.11 2002-02-14 23:46:02 richard Exp $ MAIL_DOMAIN=MAILHOST=HTTP_HOST=None HTTP_PORT=0 @@ -74,6 +74,9 @@ ANONYMOUS_ACCESS = 'deny' # either 'deny' or 'allow' # Deny or allow anonymous users to register through the web interface ANONYMOUS_REGISTER = 'deny' # either 'deny' or 'allow' +# Deny or allow anonymous users to register through the mail interface +ANONYMOUS_REGISTER_MAIL = 'deny' # either 'deny' or 'allow' + # Send nosy messages to the author of the message MESSAGES_TO_AUTHOR = 'no' # either 'yes' or 'no' @@ -82,6 +85,18 @@ EMAIL_SIGNATURE_POSITION = 'bottom' # # $Log: not supported by cvs2svn $ +# Revision 1.10 2001/11/26 22:55:56 richard +# Feature: +# . Added INSTANCE_NAME to configuration - used in web and email to identify +# the instance. +# . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup +# signature info in e-mails. +# . Some more flexibility in the mail gateway and more error handling. +# . Login now takes you to the page you back to the were denied access to. +# +# Fixed: +# . Lots of bugs, thanks Roché and others on the devel mailing list! +# # Revision 1.9 2001/10/30 00:54:45 richard # Features: # . #467129 ] Lossage when username=e-mail-address diff --git a/roundup/templates/extended/instance_config.py b/roundup/templates/extended/instance_config.py index 97cf108..f3ddcd1 100644 --- a/roundup/templates/extended/instance_config.py +++ b/roundup/templates/extended/instance_config.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: instance_config.py,v 1.10 2001-11-26 22:55:56 richard Exp $ +# $Id: instance_config.py,v 1.11 2002-02-14 23:46:02 richard Exp $ MAIL_DOMAIN=MAILHOST=HTTP_HOST=None HTTP_PORT=0 @@ -74,6 +74,9 @@ ANONYMOUS_ACCESS = 'deny' # Deny or allow anonymous users to register through the web interface ANONYMOUS_REGISTER = 'deny' +# Deny or allow anonymous users to register through the mail interface +ANONYMOUS_REGISTER_MAIL = 'deny' + # Send nosy messages to the author of the message MESSAGES_TO_AUTHOR = 'no' # either 'yes' or 'no' @@ -82,6 +85,18 @@ EMAIL_SIGNATURE_POSITION = 'bottom' # # $Log: not supported by cvs2svn $ +# Revision 1.10 2001/11/26 22:55:56 richard +# Feature: +# . Added INSTANCE_NAME to configuration - used in web and email to identify +# the instance. +# . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup +# signature info in e-mails. +# . Some more flexibility in the mail gateway and more error handling. +# . Login now takes you to the page you back to the were denied access to. +# +# Fixed: +# . Lots of bugs, thanks Roché and others on the devel mailing list! +# # Revision 1.9 2001/10/30 00:54:45 richard # Features: # . #467129 ] Lossage when username=e-mail-address -- 2.30.2