|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
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 $ |
19 | 19 |
|
20 | 20 | __doc__ = """ |
21 | 21 | WWW request handler (also used in the stand-alone server). |
@@ -1182,8 +1182,9 @@ def classes(self, message=None): |
1182 | 1182 | ''' display a list of all the classes in the database |
1183 | 1183 | ''' |
1184 | 1184 | 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'} |
1187 | 1188 |
|
1188 | 1189 | self.pagehead(_('Table of classes'), message) |
1189 | 1190 | classnames = self.db.classes.keys() |
@@ -1695,6 +1696,9 @@ def parsePropsFromForm(db, cl, form, nodeid=0, num_re=re.compile('^\d+$')): |
1695 | 1696 |
|
1696 | 1697 | # |
1697 | 1698 | # $Log: not supported by cvs2svn $ |
| 1699 | +# Revision 1.150 2002/07/30 20:43:18 gmcm |
| 1700 | +# Oops, fix the permission check! |
| 1701 | +# |
1698 | 1702 | # Revision 1.149 2002/07/30 20:04:38 gmcm |
1699 | 1703 | # Adapt metakit backend to new security scheme. |
1700 | 1704 | # Put some more permission checks in cgi_client. |
|
0 commit comments