Mercurial > p > roundup > code
comparison roundup/security.py @ 3535:75dc225613cc
fix security check for hasPermission(Permission, None)
add hasRole to HTMLUser
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 03 Feb 2006 04:04:37 +0000 |
| parents | 460eb0209a9e |
| children | 34434785f308 |
comparison
equal
deleted
inserted
replaced
| 3534:ad9f06e32f7c | 3535:75dc225613cc |
|---|---|
| 37 def test(self, db, permission, classname, property, userid, itemid): | 37 def test(self, db, permission, classname, property, userid, itemid): |
| 38 if permission != self.name: | 38 if permission != self.name: |
| 39 return 0 | 39 return 0 |
| 40 | 40 |
| 41 # are we checking the correct class | 41 # are we checking the correct class |
| 42 if (classname is not None and self.klass is not None | 42 if self.klass is not None and self.klass != classname: |
| 43 and self.klass != classname): | |
| 44 return 0 | 43 return 0 |
| 45 | 44 |
| 46 # what about property? | 45 # what about property? |
| 47 if property is not None and not self._properties_dict[property]: | 46 if property is not None and not self._properties_dict[property]: |
| 48 return 0 | 47 return 0 |
