Skip to content

Commit 02af455

Browse files
author
Richard Jones
committed
better check for anonymous viewing of user items [SF#933510]
1 parent 7418e36 commit 02af455

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Fixed:
2727
- grouping (and sorting) by multilink in RDBMS backends (sf bug 655702)
2828
- roundup scripts may now be asked for their version (sf rfe 798657)
2929
- sqlite backend had stopped using the global lock
30+
- better check for anonymous viewing of user items (sf bug 933510)
3031

3132

3233
2004-03-27 0.7.0b2

TODO.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
This file contains items that need doing before the next release:
22

3+
. make Intervals store timestamps, not strings
4+
5+
36
Optionally:
47
- have rdbms backends look up the journal for actor if it's not set
58
- migrate to numeric ID values (fixes bug 817217)

roundup/cgi/templating.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -945,9 +945,10 @@ def _user_perm_check(self, type):
945945
if getattr(self, '_nodeid', None) == userid and not is_anonymous:
946946
return 1
947947

948-
# may anonymous users register?
949-
if (is_anonymous and s.hasPermission('Web Registration', userid,
950-
self._classname)):
948+
# may anonymous users register? (so, they need to be anonymous,
949+
# need the Web Rego permission, and not trying to view an item)
950+
rego = s.hasPermission('Web Registration', userid, self._classname)
951+
if is_anonymous and rego and getattr(self, '_nodeid', None) is None:
951952
return 1
952953

953954
# nope, no access here

0 commit comments

Comments
 (0)