Skip to content

Commit 4da8a5f

Browse files
author
Richard Jones
committed
oops, thanks Duncan Booth for spotting this one
1 parent da75a9b commit 4da8a5f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

roundup/cgi_client.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: cgi_client.py,v 1.150 2002-07-30 20:43:18 gmcm Exp $
18+
# $Id: cgi_client.py,v 1.151 2002-07-30 21:37:43 richard Exp $
1919

2020
__doc__ = """
2121
WWW request handler (also used in the stand-alone server).
@@ -1182,8 +1182,9 @@ def classes(self, message=None):
11821182
''' display a list of all the classes in the database
11831183
'''
11841184
userid = self.db.user.lookup(self.user)
1185-
raise Unauthorised, _("You do not have permission to access"\
1186-
" %(action)s.")%{'action': 'all classes'}
1185+
if not self.db.security.hasPermission('Edit', userid):
1186+
raise Unauthorised, _("You do not have permission to access"\
1187+
" %(action)s.")%{'action': 'all classes'}
11871188

11881189
self.pagehead(_('Table of classes'), message)
11891190
classnames = self.db.classes.keys()
@@ -1695,6 +1696,9 @@ def parsePropsFromForm(db, cl, form, nodeid=0, num_re=re.compile('^\d+$')):
16951696

16961697
#
16971698
# $Log: not supported by cvs2svn $
1699+
# Revision 1.150 2002/07/30 20:43:18 gmcm
1700+
# Oops, fix the permission check!
1701+
#
16981702
# Revision 1.149 2002/07/30 20:04:38 gmcm
16991703
# Adapt metakit backend to new security scheme.
17001704
# Put some more permission checks in cgi_client.

0 commit comments

Comments
 (0)