Mercurial > p > roundup > code
comparison roundup/security.py @ 1218:4c9882cb16a3
more docco work
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 26 Sep 2002 00:02:24 +0000 |
| parents | 9b910e8d987d |
| children | 9b93d140b8e6 |
comparison
equal
deleted
inserted
replaced
| 1217:984c498e7deb | 1218:4c9882cb16a3 |
|---|---|
| 97 ''' | 97 ''' |
| 98 roles = self.db.user.get(userid, 'roles') | 98 roles = self.db.user.get(userid, 'roles') |
| 99 if roles is None: | 99 if roles is None: |
| 100 return 0 | 100 return 0 |
| 101 for rolename in roles.split(','): | 101 for rolename in roles.split(','): |
| 102 if not rolename: | 102 if not rolename or not self.role.has_key(rolename): |
| 103 continue | 103 continue |
| 104 # for each of the user's Roles, check the permissions | 104 # for each of the user's Roles, check the permissions |
| 105 for perm in self.role[rolename].permissions: | 105 for perm in self.role[rolename].permissions: |
| 106 # permission name match? | 106 # permission name match? |
| 107 if perm.name == permission: | 107 if perm.name == permission: |
