Skip to content

Commit be4c9e1

Browse files
author
Richard Jones
committed
strip whitespace from Role names so "User, Admin" will work
1 parent 9e58402 commit be4c9e1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
This file contains the changes to the Roundup system over time. The entries
22
are given with the most recent entry first.
33

4+
2003-??-?? 0.6.0
5+
Fixed:
6+
- strip whitespace from Role names so "User, Admin" will work
7+
8+
49
2003-05-09 0.6.0b1
510
Removed:
611
- having served its purpose as a template for other relational database

roundup/security.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def hasPermission(self, permission, userid, classname=None):
9898
roles = self.db.user.get(userid, 'roles')
9999
if roles is None:
100100
return 0
101-
for rolename in [x.lower() for x in roles.split(',')]:
101+
for rolename in [x.lower().strip() for x in roles.split(',')]:
102102
if not rolename or not self.role.has_key(rolename):
103103
continue
104104
# for each of the user's Roles, check the permissions

0 commit comments

Comments
 (0)