Mercurial > p > roundup > code
comparison roundup/cgi/templating.py @ 2574:1a041cda628c
make user permissions check more sane (fix search page for anonymous)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 14 Jul 2004 04:14:52 +0000 |
| parents | 1f4791438b65 |
| children | e90d63c7eceb |
comparison
equal
deleted
inserted
replaced
| 2573:71e03be0a25b | 2574:1a041cda628c |
|---|---|
| 1031 return 1 | 1031 return 1 |
| 1032 | 1032 |
| 1033 # may anonymous users register? (so, they need to be anonymous, | 1033 # may anonymous users register? (so, they need to be anonymous, |
| 1034 # need the Web Rego permission, and not trying to view an item) | 1034 # need the Web Rego permission, and not trying to view an item) |
| 1035 rego = s.hasPermission('Web Registration', userid, self._classname) | 1035 rego = s.hasPermission('Web Registration', userid, self._classname) |
| 1036 rego = rego and self._client.template == 'register' | |
| 1036 if is_anonymous and rego and getattr(self, '_nodeid', None) is None: | 1037 if is_anonymous and rego and getattr(self, '_nodeid', None) is None: |
| 1037 return 1 | 1038 return 1 |
| 1038 | 1039 |
| 1039 # nope, no access here | 1040 # nope, no access here |
| 1040 return 0 | 1041 return 0 |
