Skip to content

Commit c709acd

Browse files
committed
Iterate over multilink items if they labelprop is accessible to the
user. See: https://sourceforge.net/p/roundup/mailman/message/35763294/ [Roundup-devel] I can see nosy but not repeat over items Basically using tal:repeat uses the viewableGenerator() method in the templating.py MultilinkHTMLProperty. This Generator verifies that the user has access to the item referenced in the multilink. However this leads to the odd condition that: all users in the nosy list of an issue are displayed with their usernames then looking at issue3 if the user can see the nosy property of issue3. trying to tal:repeat using the elements of the nosy list in issue3 fails if the user doesn't have access to the user class. The user's ability to access the mutlilink property doesn't matter. This wierdness was fixed by changing the viewableGenerator to check for View access to the label property for the class (user in the case above).
1 parent 4807045 commit c709acd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

roundup/cgi/templating.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2275,7 +2275,9 @@ def viewableGenerator(self, values):
22752275
classname = self._prop.classname
22762276
if check('Web Access', userid):
22772277
for value in values:
2278-
if check('View', userid, classname, itemid=value):
2278+
if check('View', userid, classname,
2279+
itemid=value,
2280+
property=self._db.getclass(classname).labelprop(default_to_id=1)):
22792281
yield HTMLItem(self._client, classname, value)
22802282

22812283
def __iter__(self):

0 commit comments

Comments
 (0)