summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 73550ae)
raw | patch | inline | side by side (parent: 73550ae)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 7 Dec 2009 00:16:33 +0000 (00:16 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 7 Dec 2009 00:16:33 +0000 (00:16 +0000) |
fix mailgw to use Register permission, fixes issue2550599
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4399 57a73879-2fb5-44c3-a270-3262357dd7e2
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4399 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
doc/upgrading.txt | patch | blob | history | |
roundup/mailgw.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index cfe434a513186c87bb00fb2a9fb7622c2fe41bd2..910448e692dd9b3eedccd5ed064a5c7ae47cfb32 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
- Handle OPTIONS http request method in wsgi handler, fixes issue2550587.
Thanks to Thomas Arendsen Hein for reporting and to Intevation for
funding the fix.
+- Add documentation for migrating to the Register permission and
+ fix mailgw to use Register permission, fixes issue2550599
2009-10-09 1.4.10 (r4374)
diff --git a/doc/upgrading.txt b/doc/upgrading.txt
index b59960248f7bfec8fc1469e999cfeb3c158f09cc..70529d71ac39bd73a9b25e06a13256545944b689 100644 (file)
--- a/doc/upgrading.txt
+++ b/doc/upgrading.txt
.. contents::
+Migrating from 1.4.x to 1.4.10
+==============================
+
+Grant the "Register" permission to the Anonymous role
+-----------------------------------------------------
+
+A separate "Register" permission has been introduced to allow
+anonymous users to register. This means you will need to add the
+following to your tracker's ``schema.py`` to add the permission and
+assign it to the Anonymous role (replacing any previously assigned
+"Create user" permission for the Anonymous role):
+
+ +db.security.addPermission(name='Register', klass='user',
+ + description='User is allowed to register new user')
+
+ # Assign the appropriate permissions to the anonymous user's Anonymous
+ # Role. Choices here are:
+ # - Allow anonymous users to register
+ -db.security.addPermissionToRole('Anonymous', 'Create', 'user')
+ +db.security.addPermissionToRole('Anonymous', 'Register', 'user')
+
+The lines marked "+" should be added and lines marked "-" should be
+deleted (minus the "+"/"-" signs).
+
+
Migrating from 1.4.x to 1.4.9
=============================
diff --git a/roundup/mailgw.py b/roundup/mailgw.py
index 61470aeb96c71931f3e8d795b2ec7065032e889e..c9de63ae34d9b31af8c511ffdf936d7f2ae4c3e5 100644 (file)
--- a/roundup/mailgw.py
+++ b/roundup/mailgw.py
# Don't create users if anonymous isn't allowed to register
create = 1
anonid = self.db.user.lookup('anonymous')
- if not (self.db.security.hasPermission('Create', anonid, 'user')
+ if not (self.db.security.hasPermission('Register', anonid, 'user')
and self.db.security.hasPermission('Email Access', anonid)):
create = 0
from_address = from_list[0][1]
registration_info = ""
if self.db.security.hasPermission('Web Access', author) and \
- self.db.security.hasPermission('Create', anonid, 'user'):
+ self.db.security.hasPermission('Register', anonid, 'user'):
tracker_web = self.instance.config.TRACKER_WEB
registration_info = """ Please register at: