Skip to content

Commit aa1476c

Browse files
author
Richard Jones
committed
merge from HEAD
1 parent ce8f1d7 commit aa1476c

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Fixed:
88
- fix typo (sf patch 1076629)
99
- fix hyperlinking of items (sf bug 1080251)
1010
- fix roundup-admin find command handling of Multilinks
11+
- fix some security assertions (sf bug 1085481)
1112

1213

1314
2004-10-26 0.7.9

roundup/cgi/actions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#$Id: actions.py,v 1.27.2.7 2004-12-07 23:31:00 richard Exp $
1+
#$Id: actions.py,v 1.27.2.8 2004-12-15 00:07:58 richard Exp $
22

33
import re, cgi, StringIO, urllib, Cookie, time, random
44

@@ -127,6 +127,8 @@ def handle(self, wcre=re.compile(r'[\s,]+')):
127127

128128
# handle saving the query params
129129
if queryname:
130+
if not self.hasPermission('Edit', 'query'):
131+
raise Unauthorised, _("You do not have permission to edit queries")
130132
# parse the environment and figure what the query _is_
131133
req = templating.HTMLRequest(self.client)
132134

templates/classic/html/issue.search.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
</td>
176176
</tr>
177177

178-
<tr>
178+
<tr tal:condition="python:request.user.hasPermission('Edit', 'query')">
179179
<th>Query name**:</th>
180180
<td><input name="@queryname"
181181
tal:attributes="value request/form/@queryname/value | default"></td>

templates/classic/html/page.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ <h2><span metal:define-slot="body_title">body title</span></h2>
2525

2626
<tr>
2727
<td rowspan="2" valign="top" class="sidebar">
28-
<p class="classblock">
28+
<p class="classblock"
29+
tal:condition="python:request.user.hasPermission('View', 'query')">
2930
<b>Your Queries</b> (<a href="query?@template=edit">edit</a>)<br>
3031
<tal:block tal:repeat="qs request/user/queries">
3132
<a tal:attributes="href string:${qs/klass}?${qs/url}"

0 commit comments

Comments
 (0)