Skip to content

Commit 94137d2

Browse files
author
Richard Jones
committed
[SF#516883] mail interface + ANONYMOUS_REGISTER
1 parent e4a0b23 commit 94137d2

File tree

5 files changed

+59
-8
lines changed

5 files changed

+59
-8
lines changed

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Fixed:
1313
. Added a uniquely Roundup header to email, "X-Roundup-Name"
1414
. All forms now have "double-submit" protection when Javascript is enabled
1515
on the client-side.
16-
16+
. #516883 ] mail interface + ANONYMOUS_REGISTER
1717

1818
2002-01-24 - 0.4.0
1919
Feature:

MIGRATION.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,24 @@ Please read each section carefully and edit your instance home files
55
accordingly.
66

77
This file contains information for users upgrading from:
8+
0.4.0 -> 0.4.1
89
0.3.x -> 0.4.x
910
0.2.x -> 0.3.x
1011

1112

13+
Migrating from 0.4.0 to 0.4.1
14+
=============================
15+
16+
Configuration
17+
-------------
18+
19+
To allow more fine-grained access control, the variable used to check
20+
permission to auto-register users in the mail gateway is now called
21+
ANONYMOUS_REGISTER_MAIL rather than overloading ANONYMOUS_REGISTER. If the
22+
variable doesn't exist, then ANONYMOUS_REGISTER is tested as before.
23+
24+
25+
1226
Migrating from 0.3.x to 0.4.x
1327
=============================
1428

roundup/mailgw.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class node. Any parts of other types are each stored in separate files
7373
an exception, the original message is bounced back to the sender with the
7474
explanatory message given in the exception.
7575
76-
$Id: mailgw.py,v 1.63 2002-02-12 08:08:55 grubert Exp $
76+
$Id: mailgw.py,v 1.64 2002-02-14 23:46:02 richard Exp $
7777
'''
7878

7979

@@ -444,11 +444,15 @@ def handle_message(self, message):
444444
# handle the users
445445
#
446446

447-
# Don't create users if ANONYMOUS_REGISTER is denied
448-
if self.instance.ANONYMOUS_REGISTER == 'deny':
447+
# Don't create users if ANONYMOUS_REGISTER_MAIL is denied
448+
# ... fall back on ANONYMOUS_REGISTER if the other doesn't exist
449+
create = 1
450+
if hasattr(self.instance, 'ANONYMOUS_REGISTER_MAIL'):
451+
if self.instance.ANONYMOUS_REGISTER_MAIL == 'deny':
452+
create = 0
453+
elif self.instance.ANONYMOUS_REGISTER == 'deny':
449454
create = 0
450-
else:
451-
create = 1
455+
452456
author = self.db.uidFromAddress(message.getaddrlist('from')[0],
453457
create=create)
454458
if not author:
@@ -786,6 +790,9 @@ def parseContent(content, blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'),
786790

787791
#
788792
# $Log: not supported by cvs2svn $
793+
# Revision 1.63 2002/02/12 08:08:55 grubert
794+
# . Clean up mail handling, multipart handling.
795+
#
789796
# Revision 1.62 2002/02/05 14:15:29 grubert
790797
# . respect encodings in non multipart messages.
791798
#

roundup/templates/classic/instance_config.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: instance_config.py,v 1.10 2001-11-26 22:55:56 richard Exp $
18+
# $Id: instance_config.py,v 1.11 2002-02-14 23:46:02 richard Exp $
1919

2020
MAIL_DOMAIN=MAILHOST=HTTP_HOST=None
2121
HTTP_PORT=0
@@ -74,6 +74,9 @@
7474
# Deny or allow anonymous users to register through the web interface
7575
ANONYMOUS_REGISTER = 'deny' # either 'deny' or 'allow'
7676

77+
# Deny or allow anonymous users to register through the mail interface
78+
ANONYMOUS_REGISTER_MAIL = 'deny' # either 'deny' or 'allow'
79+
7780
# Send nosy messages to the author of the message
7881
MESSAGES_TO_AUTHOR = 'no' # either 'yes' or 'no'
7982

@@ -82,6 +85,18 @@
8285

8386
#
8487
# $Log: not supported by cvs2svn $
88+
# Revision 1.10 2001/11/26 22:55:56 richard
89+
# Feature:
90+
# . Added INSTANCE_NAME to configuration - used in web and email to identify
91+
# the instance.
92+
# . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup
93+
# signature info in e-mails.
94+
# . Some more flexibility in the mail gateway and more error handling.
95+
# . Login now takes you to the page you back to the were denied access to.
96+
#
97+
# Fixed:
98+
# . Lots of bugs, thanks Roché and others on the devel mailing list!
99+
#
85100
# Revision 1.9 2001/10/30 00:54:45 richard
86101
# Features:
87102
# . #467129 ] Lossage when username=e-mail-address

roundup/templates/extended/instance_config.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: instance_config.py,v 1.10 2001-11-26 22:55:56 richard Exp $
18+
# $Id: instance_config.py,v 1.11 2002-02-14 23:46:02 richard Exp $
1919

2020
MAIL_DOMAIN=MAILHOST=HTTP_HOST=None
2121
HTTP_PORT=0
@@ -74,6 +74,9 @@
7474
# Deny or allow anonymous users to register through the web interface
7575
ANONYMOUS_REGISTER = 'deny'
7676

77+
# Deny or allow anonymous users to register through the mail interface
78+
ANONYMOUS_REGISTER_MAIL = 'deny'
79+
7780
# Send nosy messages to the author of the message
7881
MESSAGES_TO_AUTHOR = 'no' # either 'yes' or 'no'
7982

@@ -82,6 +85,18 @@
8285

8386
#
8487
# $Log: not supported by cvs2svn $
88+
# Revision 1.10 2001/11/26 22:55:56 richard
89+
# Feature:
90+
# . Added INSTANCE_NAME to configuration - used in web and email to identify
91+
# the instance.
92+
# . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup
93+
# signature info in e-mails.
94+
# . Some more flexibility in the mail gateway and more error handling.
95+
# . Login now takes you to the page you back to the were denied access to.
96+
#
97+
# Fixed:
98+
# . Lots of bugs, thanks Roché and others on the devel mailing list!
99+
#
85100
# Revision 1.9 2001/10/30 00:54:45 richard
86101
# Features:
87102
# . #467129 ] Lossage when username=e-mail-address

0 commit comments

Comments
 (0)