diff roundup/security.py @ 1644:c98d20ba4445

strip whitespace from Role names so "User, Admin" will work
author Richard Jones <richard@users.sourceforge.net>
date Sat, 10 May 2003 23:13:10 +0000
parents 9b93d140b8e6
children fc52d57c6c3e
line wrap: on
line diff
--- a/roundup/security.py	Fri May 09 05:28:42 2003 +0000
+++ b/roundup/security.py	Sat May 10 23:13:10 2003 +0000
@@ -98,7 +98,7 @@
         roles = self.db.user.get(userid, 'roles')
         if roles is None:
             return 0
-        for rolename in [x.lower() for x in roles.split(',')]:
+        for rolename in [x.lower().strip() for x in roles.split(',')]:
             if not rolename or not self.role.has_key(rolename):
                 continue
             # for each of the user's Roles, check the permissions

Roundup Issue Tracker: http://roundup-tracker.org/