Skip to content

Commit 60fcf22

Browse files
author
Richard Jones
committed
fix permission lookup in query editing
1 parent 79a98e1 commit 60fcf22

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ are given with the most recent entry first.
66
Fixed:
77
- index args URL generation broken in .10 (sf bug 1096027)
88
- handle NotModified for non-static files (sf patch 1095790)
9+
- fix permission lookup in query editing
910

1011

1112
2005-01-04 0.7.10

roundup/cgi/actions.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#$Id: actions.py,v 1.27.2.8 2004-12-15 00:07:58 richard Exp $
1+
#$Id: actions.py,v 1.27.2.9 2005-01-05 22:09:04 richard Exp $
22

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

@@ -52,10 +52,13 @@ def permission(self):
5252
raise Unauthorised, _('You do not have permission to '
5353
'%(action)s the %(classname)s class.')%info
5454

55-
def hasPermission(self, permission):
55+
_marker = []
56+
def hasPermission(self, permission, classname=_marker):
5657
"""Check whether the user has 'permission' on the current class."""
58+
if classname is self._marker:
59+
classname = self.client.classname
5760
return self.db.security.hasPermission(permission, self.client.userid,
58-
self.client.classname)
61+
classname)
5962

6063
class ShowAction(Action):
6164
def handle(self, typere=re.compile('[@:]type'),

0 commit comments

Comments
 (0)