Skip to content

Commit 24ac24e

Browse files
author
Richard Jones
committed
fix missed hole in the CSV editing - could still view items in the generic index editor
1 parent ca60572 commit 24ac24e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

roundup/cgi/templating.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,16 @@ def csv(self):
615615
s = StringIO.StringIO()
616616
writer = csv.writer(s)
617617
writer.writerow(props)
618+
check = self._client.db.security.hasPermission
618619
for nodeid in self._klass.list():
619620
l = []
620621
for name in props:
622+
# check permission to view this property on this item
623+
if not check('View', self._client.userid, itemid=nodeid,
624+
classname=self._klass.classname, property=name):
625+
raise Unauthorised('view', self._klass.classname,
626+
translator=self._client.translator)
627+
row.append(str(klass.get(itemid, name)))
621628
value = self._klass.get(nodeid, name)
622629
if value is None:
623630
l.append('')

0 commit comments

Comments
 (0)