Code

Handle situation when timezone is not set
[roundup.git] / roundup / security.py
index e9f196efd74a7146e6c927b43c06f8c692976c55..0526b4eb8c66e3e0730d550fc42744a7229d4cce 100644 (file)
@@ -99,7 +99,7 @@ class Security:
         if roles is None:
             return 0
         for rolename in roles.split(','):
-            if not rolename:
+            if not rolename or not self.role.has_key(rolename):
                 continue
             # for each of the user's Roles, check the permissions
             for perm in self.role[rolename].permissions: