From eeae2a85bda51e6dd1b0b9e0e2c86f1bd7645f3f Mon Sep 17 00:00:00 2001 From: richard Date: Sat, 10 May 2003 23:13:10 +0000 Subject: [PATCH] strip whitespace from Role names so "User, Admin" will work git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1711 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 5 +++++ roundup/security.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0ff3c65..bb7e78a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,11 @@ This file contains the changes to the Roundup system over time. The entries are given with the most recent entry first. +2003-??-?? 0.6.0 +Fixed: +- strip whitespace from Role names so "User, Admin" will work + + 2003-05-09 0.6.0b1 Removed: - having served its purpose as a template for other relational database diff --git a/roundup/security.py b/roundup/security.py index 3c87c48..241715d 100644 --- a/roundup/security.py +++ b/roundup/security.py @@ -98,7 +98,7 @@ class Security: 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 -- 2.30.2